summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey <jcollie@fedoraproject.org>2007-01-27 03:46:38 (GMT)
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2007-01-27 03:46:38 (GMT)
commite63dd3d5711df34736760349c0f4693c0b2a4903 (patch)
treef32252c86be5439e93b3389d1855ab7562dc31a4
parentb1563a95953fa7bc0761822156014fc07f623968 (diff)
downloadsmolt-e63dd3d5711df34736760349c0f4693c0b2a4903.zip
smolt-e63dd3d5711df34736760349c0f4693c0b2a4903.tar.gz
smolt-e63dd3d5711df34736760349c0f4693c0b2a4903.tar.xz
Check to make sure that we can run lsb_release.
-rwxr-xr-xhw-client/Profile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw-client/Profile.py b/hw-client/Profile.py
index ff181b1..cd1f2e7 100755
--- a/hw-client/Profile.py
+++ b/hw-client/Profile.py
@@ -24,7 +24,10 @@ class Profile:
sys.exit(1)
self.hw = hardware.Hardware()
- self.lsbRelease = commands.getstatusoutput('/usr/bin/lsb_release')[1]
+
+ self.lsbRelease = ''
+ if os.access('/usr/bin/lsb_release', os.X_OK):
+ self.lsbRelease = commands.getstatusoutput('/usr/bin/lsb_release')[1]
try:
self.OS = file('/etc/redhat-release').read()