Nir Soffer has posted comments on this change.

Change subject: vmDevices: add __slots__ to devices
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/21036/2/vdsm/vm.py
File vdsm/vm.py:

Line 1144:         return self.doc.toprettyxml(encoding='utf-8')
Line 1145: 
Line 1146: 
Line 1147: class VmDevice(object):
Line 1148:     __slots__ = ['deviceType', 'device', 'alias', 'specParams', 
'deviceId']
> Please use tuples as they're cheaper.
And __slots__ is not mutable - using mutable type for something that it 
immutable is wrong.
Line 1149: 
Line 1150:     def __init__(self, conf, log, **kwargs):
Line 1151:         self.specParams = {}
Line 1152:         for attr, value in kwargs.iteritems():


-- 
To view, visit http://gerrit.ovirt.org/21036
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to