Modify ↓
Ticket #1026 (closed defect: fixed)
Chkconfig.Inventory() fails on Fedora15
Reported by: | http://jmk226.myopenid.com/ | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
Fedora15 client gives this message persistently when running verbose/debug mode:
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/Bcfg2/Client/Frame.py", line 323, in Install tool.Inventory(self.states, [bundle]) File "/usr/lib/python2.7/site-packages/Bcfg2/Client/Tools/__init__.py", line 143, in Inventory self.extra = self.FindExtra() File "/usr/lib/python2.7/site-packages/Bcfg2/Client/Tools/Chkconfig.py", line 92, in FindExtra self.cmd.run("/sbin/chkconfig --list|grep :on")[1]] IndexError: list index out of range
Attachments
Change History
comment:2 Changed 12 years ago by http://jmk226.myopenid.com/
Looks like this is because Fedora puts that lovely note on STDERR so it's not filtered by the grep. Changing the FindExtra? function at the end of Chkconfig.py to the following:
def FindExtra(self): """Locate extra chkconfig Services.""" allsrv = [line.split()[0] for line in \ self.cmd.run("/sbin/chkconfig --list 2>/dev/null|grep :on")[1]]
Prevents the error.
comment:3 Changed 12 years ago by solj
- Status changed from new to closed
- Resolution set to fixed
Added your fix in 9ecf23244aa27efd2e3e6924a0009ef12bf9fc37. Thanks!
Note: See
TracTickets for help on using
tickets.
chkconfig --list returns: