Apply suggestions from code review of branch stitching-cancel

Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
This commit is contained in:
Julian Stirling 2026-07-02 13:54:55 +00:00
parent c146b89e74
commit 6db8fac613

View file

@ -319,7 +319,8 @@ class SmartScanThing(OFMThing):
# Error must be raised so UI gives correct output
raise e
except lt.exceptions.InvocationCancelledError as e:
# InvocationCancelledError is caught for scanning but not for stitching
# InvocationCancelledError is caught in `_run_scan` if it happens
# while scanning, but it propagates if it occurs during stitching.
# If raised we still need to save the scan log.
if self._ongoing_scan is not None:
self._ongoing_scan.save_scan_log(self)