Change in vdsm[master]: vmDevices: add __slots__ to devices
nsoffer at redhat.com
nsoffer at redhat.com
Tue Jan 14 06:50:29 UTC 2014
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 <mpoledni at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list