Skip to content

Commit e25835a

Browse files
committed
Handle exceptions for setup phase
1 parent 2ab8e45 commit e25835a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

openhtf/plugs/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@ def initialize_plugs(
301301
self.tear_down_plugs()
302302
raise
303303
self.update_plug(plug_type, plug_instance)
304-
plug_instance.setUp()
304+
try:
305+
plug_instance.setUp()
306+
except Exception: # pylint: disable=broad-except
307+
plug_logger.exception('Exception setting up plug type %s', plug_type)
308+
self.tear_down_plugs()
309+
raise
305310

306311
def get_plug_by_class_path(self,
307312
plug_name: Text) -> Optional[base_plugs.BasePlug]:

0 commit comments

Comments
 (0)