Martin Sivák has posted comments on this change.
Change subject: Introduction for caching the parsed domain XML
......................................................................
Patch Set 13:
(2 comments)
http://gerrit.ovirt.org/#/c/17694/13/vdsm/vm.py
File vdsm/vm.py:
Line 485: return self._devices.getElementsByTagName(tagName)
Line 486:
Line 487: @property
Line 488: def hash(self):
Line 489: if self.devices and not self._hash:
Why not "self._hash is not None"?
Line 490: self._hash = str(hash(self._devices.toxml()))
Line 491: return self._hash or '0'
Line 492:
Line 493:
Line 487: @property
Line 488: def hash(self):
Line 489: if self.devices and not self._hash:
Line 490: self._hash = str(hash(self._devices.toxml()))
Line 491: return self._hash or '0'
Why the or in return? Just compute the hash and save it.
Line 492:
Line 493:
Line 494: def eventToString(event):
Line 495: return _EVENT_STRINGS[event]
--
To view, visit
http://gerrit.ovirt.org/17694
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e106b2f2d3f4160d4e882f1a2880cb1b52fbb22
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes