From 5a35caddd2815d3efcbf09bf10220422b579dc37 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Wed, 19 Apr 2006 18:44:59 +0000 Subject: Fix potential toolset failure git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1845 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Redhat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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': -- cgit v1.2.3-1-g7c22