diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-04-16 21:33:42 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-04-16 21:33:42 +0100 |
commit | 0acc5da2ec4150bda80250674c91ca0cd8e88450 (patch) | |
tree | 60bcb3247dedec8239d5cdda6b46343cc4620a13 | |
parent | cccef1838baf26795bbfba914d30243cca704707 (diff) | |
download | sos-0acc5da2ec4150bda80250674c91ca0cd8e88450.tar.gz |
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 <bmr@redhat.com>
-rw-r--r-- | sos/sosreport.py | 7 |
1 files changed, 7 insertions, 0 deletions
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 |