catch KeyboardInterrupt in the direct call case
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user