diff options
-rw-r--r-- | sos/sosreport.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py index 02d9b21c..ee33a9fa 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -1176,9 +1176,13 @@ class SoSReport(object): msg += _("Press ENTER to continue, or CTRL-C to quit.\n") try: input(msg) - except Exception as err: + except KeyboardInterrupt as e: + self.ui_log.error("Exiting on user cancel") + self._exit(130) + except Exception as e: self.ui_log.info("") - self._exit(err) + self.ui_log.error(e) + self._exit(e) def _log_plugin_exception(self, plugin, method): trace = traceback.format_exc() |