diff options
author | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2010-06-03 15:49:42 +0000 |
---|---|---|
committer | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2010-06-03 15:49:42 +0000 |
commit | 27d6e5732cd878a889f37a77f035cd83991a4e70 (patch) | |
tree | 2b7fedd04b7e4dd8f320c525800e84d6d85144bc | |
parent | 00d36b21427364975a49a9de63c1dbd3e9468c1b (diff) | |
download | sos-27d6e5732cd878a889f37a77f035cd83991a4e70.tar.gz |
Catch exception on file read -- print alert to report
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@968 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r-- | sos/plugins/veritas.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sos/plugins/veritas.py b/sos/plugins/veritas.py index e1cdf7af..11d4ddf2 100644 --- a/sos/plugins/veritas.py +++ b/sos/plugins/veritas.py @@ -30,12 +30,15 @@ class veritas(sos.plugintools.PluginBase): def setup(self): """ interface with vrtsexplorer to capture veritas related data """ - if os.path.isfile(self.getOption("script")): - stat, out, runtime = self.callExtProg(self.getOption("script")) + stat, out, runtime = self.callExtProg(self.getOption("script")) + try: for line in out.readlines(): line = line.strip() tarfile = self.doRegexFindAll(r"ftp (.*tar.gz)", line) if len(tarfile) == 1: self.addCopySpec(tarfile[0]) + except AttributeError, e: + self.addAlert(e)v + return return |