Skip to content

Commit a11b4fb

Browse files
authored
Merge pull request #809 from samhitech/main
Bugfix: stop_headless raises AttributeError #808
2 parents d7c8945 + cbd8391 commit a11b4fb

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

pycromanager/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version_info = (1, 0, 1)
1+
version_info = (1, 0, 2)
22
__version__ = ".".join(map(str, version_info))

pycromanager/acquisition/acq_eng_py/internal/engine.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def get_core():
3737

3838
@staticmethod
3939
def get_instance():
40+
if not hasattr(Engine, 'singleton'):
41+
return None
42+
4043
return Engine.singleton
4144

4245
def finish_acquisition(self, acq):

pycromanager/headless.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ def start_headless(
5858

5959
def stop_headless(debug=False):
6060
terminate_core_instances(debug=debug)
61-
Engine.get_instance().shutdown()
61+
if Engine.get_instance():
62+
Engine.get_instance().shutdown()
6263

0 commit comments

Comments
 (0)