From 0acc5da2ec4150bda80250674c91ca0cd8e88450 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 16 Apr 2014 21:33:42 +0100 Subject: Handle fatal file system errors in SoSReport.postproc() 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 9b068a90..9da1ff63 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -1126,6 +1126,13 @@ class SoSReport(object): for plugname, plug in self.loaded_plugins: try: plug.postproc() + except OSError as e: + if e.errno in fatal_fs_errors: + self.ui_log.error("") + self.ui_log.error(" %s while post-processing plugin data" + % e.strerror) + self.ui_log.error(" %s" % e.filename) + self._exit(1) except: if self.raise_plugins: raise -- cgit