Change in vdsm[master]: caps: replacing minidom with ElementTree in caps.py

fromani at redhat.com fromani at redhat.com
Mon Jun 1 11:29:38 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: caps: replacing minidom with ElementTree in caps.py
......................................................................


Patch Set 9:

(1 comment)

https://gerrit.ovirt.org/#/c/41078/9/vdsm/caps.py
File vdsm/caps.py:

Line 207:     if capabilities is None:
Line 208:         capabilities = _getFreshCapsXMLStr()
Line 209: 
Line 210:     caps = ET.fromstring(capabilities)
Line 211:     host = caps.iter(tag='host').next()
> When we need only one element (like here) I can see why
You have a point about findall(). In these case is fine to use an iterator-based approach.
Line 212:     cells = host.iter(tag='cells').next()
Line 213: 
Line 214:     sockets = set()
Line 215:     siblings = set()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8c1ca58807515922347e2255c77b4f950decd619
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list