diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-04-19 18:44:59 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-04-19 18:44:59 +0000 |
commit | 5a35caddd2815d3efcbf09bf10220422b579dc37 (patch) | |
tree | 510028e5298f4388e2b83761bfdb3f09424c0bdc /src/lib | |
parent | 31e615547a94694abf18572e13e935937ac58073 (diff) | |
download | bcfg2-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/lib')
-rw-r--r-- | src/lib/Client/Redhat.py | 5 |
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': |