File tree Expand file tree Collapse file tree
sdks/python/apache_beam/io/gcp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838
3939# Protect against environments where bigtable library is not available.
4040try :
41- from apitools . base . py . exceptions import HttpError
41+ from google . api_core . exceptions import GoogleAPICallError
4242 from google .cloud .bigtable import client
4343 from google .cloud .bigtable .row import Cell
4444 from google .cloud .bigtable .row import DirectRow
4848 from google .cloud .bigtable_admin_v2 .types import instance
4949except ImportError as e :
5050 client = None
51- HttpError = None
51+ GoogleAPICallError = None
5252
5353
5454def instance_prefix (instance ):
@@ -109,7 +109,7 @@ def tearDown(self):
109109 self .instance .instance_id )
110110 self .table .delete ()
111111 self .instance .delete ()
112- except HttpError :
112+ except GoogleAPICallError :
113113 _LOGGER .warning (
114114 "Failed to clean up table [%s] and instance [%s]" ,
115115 self .table .table_id ,
@@ -208,15 +208,15 @@ def tearDown(self):
208208 try :
209209 _LOGGER .info ("Deleting table [%s]" , self .table .table_id )
210210 self .table .delete ()
211- except HttpError :
211+ except GoogleAPICallError :
212212 _LOGGER .warning ("Failed to clean up table [%s]" , self .table .table_id )
213213
214214 @classmethod
215215 def tearDownClass (cls ):
216216 try :
217217 _LOGGER .info ("Deleting instance [%s]" , cls .instance .instance_id )
218218 cls .instance .delete ()
219- except HttpError :
219+ except GoogleAPICallError :
220220 _LOGGER .warning (
221221 "Failed to clean up instance [%s]" , cls .instance .instance_id )
222222
You can’t perform that action at this time.
0 commit comments