Zhou Zheng Sheng has posted comments on this change.
Change subject: Make vdsm/clientIF.py PEP8 clean ......................................................................
Patch Set 3: Verified
(1 inline comment)
The patch passes vdsm tests.
pydiff report:
$ pydiff clientIF*.py 5 difference(s) first file: clientIFo.py second file: clientIF.py
((233, "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('GUID')], None, None)"), (238, "Compare(Const('GUID'), [('in', Name('drive'))])"))
((244, "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('UUID')], None, None)"), (249, "Compare(Const('UUID'), [('in', Name('drive'))])"))
((247, "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('specParams')], None, None)"), (252, "Compare(Const('specParams'), [('in', Name('drive'))])"))
((248, "CallFunc(Getattr(Subscript(Name('drive'), 'OP_APPLY', [Const('specParams')]), 'has_key'), [Const('vmPayload')], None, None)"), (253, "Compare(Const('vmPayload'), [('in', Subscript(Name('drive'), 'OP_APPLY', [Const('specParams')]))])"))
((260, "CallFunc(Getattr(Name('drive'), 'has_key'), [Const('path')], None, None)"), (266, "Compare(Const('path'), [('in', Name('drive'))])"))
All the code logic differences are about change "aDict.has_key(aKey)" into "aKey in aDict". I think these changes are acceptable.
.................................................... File vdsm/clientIF.py Line 253: 'vmPayload' in drive['specParams']): Thanks for the advice. If I put them into one line, it will occupy 79 columns. I think the both ways are OK. If there is another person thinks I should put them into one line, I will do it.
-- To view, visit http://gerrit.ovirt.org/4802 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I0f912dd53f84b57f09665edb80c99768006e725c Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com