frappy.client.interactive: fix error handling while interrupted
Change-Id: If79ebe322eb865fd0780622fdd357c092bf12216
This commit is contained in:
@@ -242,16 +242,19 @@ class Module:
|
||||
loop()
|
||||
except KeyboardInterrupt:
|
||||
self._secnode.log.info('-- interrupted --')
|
||||
exc = None
|
||||
try:
|
||||
self.stop()
|
||||
except Exception as e:
|
||||
print(f'while stopping: {e!r}')
|
||||
exc = e
|
||||
try:
|
||||
loop() # wait for stopping to be finished
|
||||
except KeyboardInterrupt:
|
||||
# interrupted again while stopping -> definitely quit
|
||||
pass
|
||||
clientenv.raise_with_short_traceback(e)
|
||||
if exc:
|
||||
print(f'while stopping: {e!r}')
|
||||
clientenv.raise_with_short_traceback(exc)
|
||||
finally:
|
||||
self._secnode.readParameter(self._name, 'value')
|
||||
for pname in watch_params:
|
||||
|
||||
Reference in New Issue
Block a user