Dan Kenigsberg has posted comments on this change.

Change subject: hostdev: decode XML string when parsing devices
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/54802/1/lib/vdsm/hostdev.py
File lib/vdsm/hostdev.py:

Line 118:                       'usb_device': _parse_usb_address}
Line 119: 
Line 120:     params = {}
Line 121: 
Line 122:     devXML = etree.fromstring(device_xml.decode('ascii', 
errors='ignore'))
> See the other comment - it's most likely case of un-printable characters. T
I did not understand your comment, but hey - 'replace' give the annoying 
unicode replace char. Is that what worries you?

>>> '<product>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ</product>'.decode('ascii', 
>>> 'ignore')
u'<product></product>'
>>> '<product>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ</product>'.decode('ascii', 
>>> 'replace')
u'<product>\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</product>'
Line 123:     name = devXML.find('name').text
Line 124:     if name != 'computer':
Line 125:         params['parent'] = devXML.find('parent').text
Line 126: 


-- 
To view, visit https://gerrit.ovirt.org/54802
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaf9b9699790c83bb82a88a700c63d05604588d02
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Edward Haas <edwa...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to