Skip to content

Commit 1eac119

Browse files
remove call which prematurely tears down multiplug
1 parent 6f630fa commit 1eac119

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

openhtf/plugs/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,6 @@ def initialize_plugs(
261261
plug_instance: plug_type
262262
if plug_type in self._unmanaged_plugs:
263263
plug_instance = self._unmanaged_plugs[plug_type]
264-
try:
265-
plug_instance.setUp()
266-
except Exception: # pylint: disable=broad-except
267-
self.tear_down_plugs()
268-
raise
269264
else:
270265
# Create a logger for this plug. All plug loggers go under the 'plug'
271266
# sub-logger in the logger hierarchy.
@@ -304,7 +299,7 @@ def initialize_plugs(
304299
plug_logger.exception('Exception instantiating plug type %s', plug_type)
305300
self.tear_down_plugs()
306301
raise
307-
self.update_plug(plug_type, plug_instance)
302+
self.update_plug(plug_type, plug_instance)
308303
try:
309304
plug_instance.setUp()
310305
except Exception: # pylint: disable=broad-except
@@ -342,6 +337,7 @@ def update_plug(self, plug_type: Type[PlugT], plug_value: PlugT) -> None:
342337
plug_type: The plug class to update.
343338
plug_value: The plug class instance to store.
344339
"""
340+
print('update_plug called')
345341
self._plug_types.add(plug_type)
346342
if plug_type in self._plugs_by_type:
347343
self._plugs_by_type[plug_type].tearDown()

0 commit comments

Comments
 (0)