If verbose, print stacktrace on KeyboardInterrupt

This commit is contained in:
James R. Barlow
2019-06-12 13:55:43 -07:00
parent 0bbd6885e2
commit 066a293462
+4 -1
View File
@@ -330,7 +330,10 @@ def run_pipeline(options, api=False):
# Execute the pipeline
exec_concurrent(context)
except (KeyboardInterrupt if not api else NeverRaise) as e:
log.error("KeyboardInterrupt")
if options.verbose >= 1:
log.exception("KeyboardInterrupt")
else:
log.error("KeyboardInterrupt")
return ExitCode.ctrl_c
except (ExitCodeException if not api else NeverRaise) as e:
if str(e):