From 062110c312207a1f782337697c0f3902048937fb Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 16 Apr 2014 21:10:27 +0100 Subject: Handle fatal file system errors in SoSReport.collect() Out-of-space and read-only file system errors from plugins should be treated as fatal and cause the run to end. Partial fix for Issue #266. Signed-off-by: Bryn M. Reeves --- sos/sosreport.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sos/sosreport.py b/sos/sosreport.py index 52bfe8b0..6b5220d2 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -978,6 +978,13 @@ class SoSReport(object): plug.collect() except KeyboardInterrupt: raise + except OSError as e: + if e.errno in fatal_fs_errors: + self.ui_log.error("") + self.ui_log.error(" %s while collecting plugin data" + % e.strerror) + self.ui_log.error(" %s" % e.filename) + self._exit(1) except: if self.raise_plugins: raise -- cgit