Dan Kenigsberg has posted comments on this change.
Change subject: iproute2 binary wrapper
......................................................................
Patch Set 20: (2 inline comments)
....................................................
File vdsm/ipwrapper.py
Line 37:
Line 38:
Line 39: class Route(object):
Line 40: def __init__(self, network, ipaddr=None, device=None, table=None):
Line 41: if not _isValid(network, IPNetwork):
we have here a complex way of saying
try:
IPAddress(network)
except AddrFormatError:
raise ValueError
and I'm not really sure why ValueError is better than the internal
AddrFormatError object.
Line 42: raise ValueError('network is not properly defined')
Line 43:
Line 44: if ipaddr and not _isValid(ipaddr, IPAddress):
Line 45: raise ValueError('ipaddr is not properly defined')
Line 158:
Line 159: return cls(table, source=source, destination=destination)
Line 160:
Line 161: def __str__(self):
Line 162: str = 'from '
Do you have a vendeta against the double quotes mark?
(I really do not care)
Line 163: if self.source:
Line 164: str += self.source
Line 165: else:
Line 166: str += 'all'
--
To view, visit http://gerrit.ovirt.org/15335
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1d315c3294fd7f058cdc840dea329d91a658a304
Gerrit-PatchSet: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches