From afdf2edaffc89fab80f8f2ac79280ffe91346cbe Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 7 Apr 2014 20:31:44 +0100
Subject: [PATCH 05/17] Raise fatal IO exceptions in PluginBase

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugintools.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sos/plugintools.py b/sos/plugintools.py
index f4f7c0a..97deedf 100644
--- a/sos/plugintools.py
+++ b/sos/plugintools.py
@@ -37,6 +37,7 @@ from time import time
 from itertools import *
 from collections import deque
 import fnmatch
+import errno
 
 class PluginException(Exception): pass
 
@@ -242,12 +243,14 @@ class PluginBase:
         except PluginException:
             self.soslog.debug("error copying file %s (already exists)" % (srcpath))
             return
-        except IOError:
+        except IOError as e:
+            if e.errno in (errno.ENOSPC, errno.EROFS):
+                raise
             self.soslog.info("error copying file %s (IOError)" % (srcpath))
             return 
         except:
             self.soslog.exception("error copying file %s" % (srcpath))
-            return 
+            raise 
 
         self.copiedFiles.append({'srcpath':srcpath, 'dstpath':tdstpath, 'symlink':"no"}) # save in our list
 
-- 
1.9.3

