+++ This bug was initially created as a clone of Bug #741476 +++ Description of problem: API system.getDmi() method does not return any value if some row at DB is null Version-Release number of selected component (if applicable): Spacewalk 1.6 Nightly Version How reproducible: 100% Steps to Reproduce: Reproducer available at BZ#741476 +++++++++++++++++++++++= # python api-dmi.py { .. SNIP .. } 1000010003 {'product': '', 'vendor': '', 'bios_vendor': '', 'system': 'SYSTEM_MANUAL_FILLED', 'bios_release': '', 'board': '', 'bios_version': '1.17', 'asset': ''} ******************** Changing DB: SQL> update rhnserverdmi set BIOS_VERSION = '' where SERVER_ID = 1000010003; 1 row updated. SQL> select ID, BIOS_VENDOR, BIOS_VERSION, BIOS_RELEASE from rhnserverdmi where SERVER_ID = 1000010003; ID BIOS_VENDOR BIOS_VERSION BIOS_RELEASE ---------- ------------------------------ -------------------- --------------- 184 SQL> select ID, SERVER_ID, VENDOR, SYSTEM, PRODUCT from rhnserverdmi whereSERVER_ID = 1000010003; ID SERVER_ID VENDOR SYSTEM PRODUCT ---------- ---------- ------------------------------ ---------------------------------------- -------------------------------------------------- 184 1000010003 SYSTEM_MANUAL_FILLED =================// ===================// ========= Executing python script: # python api-dmi.py { .. SNIP .. } Traceback (most recent call last): File "api-dmi.py", line 12, in <module> sys_dmi = server.system.getDmi(token,int(system['id'])) File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/xmlrpclib.py", line 1297, in single_request return self.parse_response(response) File "/usr/lib64/python2.7/xmlrpclib.py", line 1462, in parse_response p.feed(data) File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 76
Taking...
Created attachment 526336 [details] patch proposed Hello, Follow a patch addressed to this BZ. Created an test package and worked as expected. Patch already sent to spacewalk-devel maillist Mail Thread: https://www.redhat.com/archives/spacewalk-devel/2011-October/msg00001.html Best, mmello
Created attachment 526571 [details] patch proposed Better looking patch
Created attachment 526818 [details] patch proposed Hello, Mail thread -> https://www.redhat.com/archives/spacewalk-devel/2011-October/msg00009.html
Fixed in Spacewalk master, 6742bdedf6669d146316da043048ab16f0862ca9.
Spacewalk 1.6 has been released.