diff options
author | David Sommerseth <davids@redhat.com> | 2009-06-15 11:11:55 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-06-15 11:11:55 +0200 |
commit | e9a6b7f9ec31c1227be982fb8f2bb0ee8bf97710 (patch) | |
tree | 9f0a44c510c52908ba1a6fad3bec5b17a88b2cb3 /src/setup.py | |
parent | 20030e42b4d3f7283f6143641cb009a8dbf1da24 (diff) | |
download | python-dmidecode-e9a6b7f9ec31c1227be982fb8f2bb0ee8bf97710.tar.gz python-dmidecode-e9a6b7f9ec31c1227be982fb8f2bb0ee8bf97710.tar.xz python-dmidecode-e9a6b7f9ec31c1227be982fb8f2bb0ee8bf97710.zip |
Fixed wrong behavivour in pythonizeXMLnode() when no key value is found
If the XPath expression for the key value points on a non-existing XML
node, it would earlier abort pythonizing the XML data. Even though this
could look like the correct behaviour, it will not work out well in
reality.
For sections like 'bios', it might be that the DMI/SMBIOS data do not
describe or provide the BIOSLanguage section (type id 0x0D). Which
means calling dmidecode.bios() would fail completely instead of
reporting what it could find.
This patch fixes this issue and it will normally ignore not found key
values and just continue pythonizing the XML data and return what it
managed to translate into a Python dictionary.
If DEBUG is defined when compiling python-dmidecode, a warning message
will be printed directly to stderr when a key value is not found.
A warning is printed if dmidecode is compiled with DEBUG defined.
Diffstat (limited to 'src/setup.py')
0 files changed, 0 insertions, 0 deletions