Skip to content

Commit 26b6ce3

Browse files
authored
InstrumentSetupper: Do not teardown instrument when it is not ready (#101)
1 parent 3e77f97 commit 26b6ce3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

microbootstrap/instruments_setupper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def setup(self) -> None:
5656

5757
def teardown(self) -> None:
5858
for instrument in self.instrument_box.instruments:
59-
instrument.teardown()
59+
if instrument.is_ready():
60+
instrument.teardown()
6061

6162
def __enter__(self) -> None:
6263
self.setup()

0 commit comments

Comments
 (0)