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 <vfeen...@redhat.com> Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Peter V. Saveliev <p...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches