bootstrap_firmware fails on a PE 1950 with dual Intel Quad Core processors
Eric Raskin
eraskin at paslists.com
Tue Jan 29 11:27:33 CST 2008
There seems to be a problem with device identification on our PowerEdge
1950 with dual Intel Quad Core processors. bootstrap_firmware is
aborting at:
bootstrap_pci.py line 78 in makePciDevice:
kargs["pci_Vendor_txt"], kargs["pciVendor"] =
splitTextFromNumeric(oneDevData["vendor"])
TypeError: unpack non-sequence.
I'm not a python expert, but I think that the splitTextFromNumeric
didn't return a list with two entries.
oneDevData contains:
(Pdb) print oneDevData
{'svendor': '8086', 'vendor': '8086', 'rev': '12', 'sdevice': '8086',
'device1': '25c0', 'device0': '0000:00:00.0', 'class': '0600'}
As you can see, the vendor field does not contain any brackets, so
splitTextFromNumeric can't match words. Its code is:
vendevRe = re.compile(r'^(.*)\[(\w+)\]')
decorate(traceLog())
def splitTextFromNumeric(line):
match = vendevRe.search(line)
if match:
text = match.group(1)
number = match.group(2)
return (text, number)
return None
Your regular expression appears to be looking for text in brackets. If
the match fails, then the function returns None. Otherwise, it returns
the first and second match groups - the text before the brackets and the
number inside the brackets.
In our case, the data only contains '8086', a number with no brackets.
Hence we return None, which can't be unpacked as a list of two items.
I suggest the following change:
from
return None
to
return ('', line)
This would return the original input as the pciVendor if there is no
text in brackets. The pciVendor_txt field is an empty string so that
the .lower() function used later will continue to work.
The bootstrap_firmware command now executes to completion.
Unfortunately, I can't tell if the output is OK.
Is this a valid fix?
Eric
--
--------------------------------------------------------------------
Eric H. Raskin Voice: 914-765-0500 x120
Professional Advertising Systems Inc. Fax: 914-765-0503
200 Business Park Dr Ste 304 EMail: eraskin at paslists.com
Armonk NY 10504 Web: www.paslists.com
More information about the firmware-tools-devel
mailing list