aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2018-06-06 11:23:56 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-06-06 11:23:56 +0100
commitced2719d4fcb7dc111c048f20b589b9de0b2d370 (patch)
tree84a553906374040f7d22598f00f21f76eb6e95cd
parent8615c73862803147d357fae81df082ca41774c51 (diff)
downloadsos-ced2719d4fcb7dc111c048f20b589b9de0b2d370.tar.gz
[sosreport] make Ctrl-C exit messages consistent
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/sosreport.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py
index d19b1a36..890e1385 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -1287,7 +1287,8 @@ class SoSReport(object):
self.plugpool.shutdown(wait=True)
self.ui_log.info("")
except KeyboardInterrupt:
- self.ui_log.error(" Keyboard interrupt\n")
+ # We may not be at a newline when the user issues Ctrl-C
+ self.ui_log.error("\nExiting on user cancel\n")
os._exit(1)
def _collect_plugin(self, plugin):
@@ -1670,7 +1671,7 @@ class SoSReport(object):
except (OSError):
self._cleanup()
except (KeyboardInterrupt):
- self.ui_log.error("Exiting on user cancel")
+ self.ui_log.error("\nExiting on user cancel")
self._cleanup()
self._exit(130)
except (SystemExit):