Skip to content

Commit c9e4a97

Browse files
committed
handle KeyboardInterrupt
1 parent 6d96f7e commit c9e4a97

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

mapillary_tools/commands/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ def main():
175175
log_exception(ex)
176176
sys.exit(ex.exit_code)
177177

178+
except KeyboardInterrupt:
179+
LOG.info("Interrupted by user...")
180+
sys.exit(130)
181+
178182

179183
if __name__ == "__main__":
180184
main()

mapillary_tools/upload.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ def upload(
121121
_api_logging_failed(_summarize(stats), ex, dry_run=dry_run)
122122
raise ex
123123

124-
except KeyboardInterrupt:
125-
LOG.info("Upload interrupted by user...")
126-
127124
else:
128125
_api_logging_finished(_summarize(stats), dry_run=dry_run)
129126

0 commit comments

Comments
 (0)