Change in vdsm[master]: make vdsm/libvirtvm.py PEP 8 clean

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Wed Jul 25 03:50:29 UTC 2012


Zhou Zheng Sheng has posted comments on this change.

Change subject: make vdsm/libvirtvm.py PEP 8 clean
......................................................................


Patch Set 2: Verified; Looks good to me, but someone else must approve

Runs through autobuild.sh.

pydiff reports 11 differences. 10 of them is changeing "aDict.has_key['aKey']" to "aKey in aDict". The rest one is in line 1974 of the old file and 2084 of the patched file. After examining the corresponding lines. I found there was a problem in splitting string in line 1974. The correct split is in the line 2084 of the patched file. All these changes are acceptable.

Review the code. Style is OK for me. However this is a bit change, so I think we may need other reviews advices.

P.S.
The detialed pydiff report is as follow:

$ pydiff libvirtvmo.py libvirtvm.py 
11 difference(s)
first file: libvirtvmo.py
second file: libvirtvm.py

((1600,
  "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('domainID')], None, None)"),
 (1700, "Compare(Const('domainID'), [('in', Name('drive'))])"))

((1611,
  "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('GUID')], None, None)"),
 (1711, "Compare(Const('GUID'), [('in', Name('drive'))])"))

((1618,
  "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('UUID')], None, None)"),
 (1718, "Compare(Const('UUID'), [('in', Name('drive'))])"))

((1648,
  "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('baseVolumeID')], None, None)"),
 (1748, "Compare(Const('baseVolumeID'), [('in', Name('drive'))])"))

((1656,
  "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('baseGUID')], None, None)"),
 (1756, "Compare(Const('baseGUID'), [('in', Name('drive'))])"))

((1660,
  "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('baseUUID')], None, None)"),
 (1760, "Compare(Const('baseUUID'), [('in', Name('drive'))])"))

((1667,
  "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('mirrorDomainID')], None, None)"),
 (1767, "Compare(Const('mirrorDomainID'), [('in', Name('drive'))])"))

((1974,
  '%s = %s/%s error %s phys: %s alloc: %s                                       Ingnoring already managed event.'),
 (2084,
  '%s = %s/%s error %s phys: %s alloc: %s Ingnoring already managed event.'))

((2030,
  "CallFunc(Getattr(Getattr(Name('drive'), 'specParams'), 'has_key'), [Const('vmPayload')], None, None)"),
 (2145,
  "Compare(Const('vmPayload'), [('in', Getattr(Name('drive'), 'specParams'))])"))

((2185,
  "CallFunc(Getattr(Name('dev'), 'has_key'), [Const('index')], None, None)"),
 (2309, "Compare(Const('index'), [('in', Name('dev'))])"))

((2186,
  "CallFunc(Getattr(Name('dev'), 'has_key'), [Const('model')], None, None)"),
 (2310, "Compare(Const('model'), [('in', Name('dev'))])"))

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I12735cc8fdaeb91c77f63e16a262b0cd8acfbba4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list