catch KeyboardInterrupt in the direct call case

This commit is contained in:
2020-07-04 20:33:12 +02:00
parent 78e36d1be6
commit b32ef07cfd
3 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -49,7 +49,10 @@ class Acquisition(BaseAcquisition):
self.current_task = task
if wait:
task.wait()
try:
task.wait()
except KeyboardInterrupt:
print("Stopped current DAQ task:")
return task
+4 -1
View File
@@ -72,7 +72,10 @@ class DIAAcquisition(BaseAcquisition):
self.current_task = task
if wait:
task.wait()
try:
task.wait()
except KeyboardInterrupt:
print("Stopped current DAQ task:")
return task
+4 -1
View File
@@ -52,7 +52,10 @@ class SFAcquisition(BaseAcquisition):
self.current_task = task
if wait:
task.wait()
try:
task.wait()
except KeyboardInterrupt:
print("Stopped current DAQ task:")
return task