Dan Kenigsberg has posted comments on this change.
Change subject: BZ#855924 fix VM config dictionary
......................................................................
Patch Set 4: I would prefer that you didn't submit this
(1 inline comment)
....................................................
File vdsm/vm.py
Line 214: items and set them up as full paths
Line 215: """
Line 216: # care only about "drives" list, since
Line 217: # "devices" doesn't cause errors
Line 218: if 'drives' in self._vm.conf.keys():
.keys() creates a needless list, and looking for drives in it adds a needless
O(n) search.
if 'drives' in self._vm.conf:
has the same semantics but is cleaner. but please verify!
Line 219: for item in ("cdrom", "floppy"):
Line 220: new_drives = []
Line 221: for drive in self._vm.conf['drives']:
Line 222: if drive['device'] == item:
--
To view, visit http://gerrit.ovirt.org/8627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I33e957f8daac4266d9e19cc008cf830bd395fffe
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Peter V. Saveliev <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Gal Hammer <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Peter V. Saveliev <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches