Mark Wu has posted comments on this change.
Change subject: Make netinfo.py PEP8 clean
......................................................................
Patch Set 4: (1 inline comment)
Sorry for submitting a patch without build.
Actually, I built it with patch set2, but I forgot to update PEP8 WHITELIST in
that version. And I just use vim plugin and flake8 to check v3 patch.
Unfortunately, there's a bug in flake8:
It doesn't report any error on the original code:
raise ValueError, 'unknown bridge %s' % (bridge,)
but it complains the exception style error on this code:
raise ValueError, 'unknown bridge %s' % bridge
Anyway, I am sorry the mistake.
....................................................
File vdsm/netinfo.py
Line 187: def getVlanBondingNic(bridge):
Line 188: """Return the (vlan, bonding, nics) tupple that belongs to
bridge."""
Line 189:
Line 190: if bridge not in bridges():
Line 191: raise ValueError('unknown bridge %s' % bridge)
Besides changing to use new-style exception, another change is using bridge as
a str directly instead of tuple.
Line 192: vlan = bonding = ''
Line 193: nics = []
Line 194: for iface in os.listdir('/sys/class/net/' + bridge + '/brif'):
Line 195: if iface in vlans():
--
To view, visit http://gerrit.ovirt.org/7922
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib3ee6348a0a9eb4366b1571ab5883deba9b40d0a
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches