From 27d6e5732cd878a889f37a77f035cd83991a4e70 Mon Sep 17 00:00:00 2001 From: astokes Date: Thu, 3 Jun 2010 15:49:42 +0000 Subject: 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 --- sos/plugins/veritas.py | 7 +++++-- 1 file 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 -- cgit