summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-04-19 18:44:59 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-04-19 18:44:59 +0000
commit5a35caddd2815d3efcbf09bf10220422b579dc37 (patch)
tree510028e5298f4388e2b83761bfdb3f09424c0bdc /src
parent31e615547a94694abf18572e13e935937ac58073 (diff)
downloadbcfg2-5a35caddd2815d3efcbf09bf10220422b579dc37.tar.gz
bcfg2-5a35caddd2815d3efcbf09bf10220422b579dc37.tar.bz2
bcfg2-5a35caddd2815d3efcbf09bf10220422b579dc37.zip
Fix potential toolset failure
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1845 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Redhat.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py
index 15e87ffa4..c1c2f69c5 100644
--- a/src/lib/Client/Redhat.py
+++ b/src/lib/Client/Redhat.py
@@ -45,7 +45,10 @@ class ToolsetImpl(Toolset):
if entry.attrib['type'] == 'xinetd':
return entry.attrib['status'] == srvdata[1]
- onlevels = [level.split(':')[0] for level in srvdata[1:] if level.split(':')[1] == 'on']
+ try:
+ onlevels = [level.split(':')[0] for level in srvdata[1:] if level.split(':')[1] == 'on']
+ except IndexError:
+ onlevels = []
# chkconfig/init.d service
if entry.get('status') == 'on':