aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2012-11-29 21:06:10 +0000
committerBryn M. Reeves <bmr@redhat.com>2012-11-29 21:06:10 +0000
commit7426d0a2bc1e3743efc72a7d102a0729d60c493a (patch)
tree713dd7c693b0788e8b5ca4cbcfd0d2fb603f901c
parent8cd42d3d2af6f707d6a3ae1a84424669811aeb3e (diff)
downloadsos-7426d0a2bc1e3743efc72a7d102a0729d60c493a.tar.gz
Fix exception in hardware plugin on recent Red Hat systems
The up2date client hardware.py script is obsolete on recent Red Hat distributions. Don't throw an exception if it does not exist.
-rw-r--r--sos/plugins/hardware.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/hardware.py b/sos/plugins/hardware.py
index a196d366..b6418e98 100644
--- a/sos/plugins/hardware.py
+++ b/sos/plugins/hardware.py
@@ -61,7 +61,10 @@ class RedHatHardware(hardware, RedHatPlugin):
def setup(self):
super(RedHatHardware, self).setup()
- self.collectExtOutput(glob("/usr/share/rhn/up2date*client/hardware.py")[0]) # RHBZ#572353
+ try:
+ self.collectExtOutput(glob("/usr/share/rhn/up2date*client/hardware.py"))
+ except NameError:
+ pass
class DebianHardware(hardware, DebianPlugin, UbuntuPlugin):