Dan Kenigsberg has posted comments on this change.

Change subject: improve the readability of prefix2netmask
......................................................................


Patch Set 1: Looks good to me, but someone else must approve

(1 inline comment)

....................................................
File vdsm/netinfo.py
Line 169: 
Line 170: 
Line 171: def prefix2netmask(prefix):
Line 172:     return socket.inet_ntoa(
Line 173:         struct.pack("!I", int('1' * prefix + '0' * (32 - prefix), 2)))
I personally find the suggested code as more readable then the removed one 
(only becaus ljust() is not very commonplace).

So unless someone gives this a -1, I'll take it in.
Line 174: 
Line 175: 
Line 176: def getnetmask(dev):
Line 177:     dev_info_list = ethtool.get_interfaces_info(dev.encode('utf8'))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I42519c4d67c0b4cf6415160ca051583dddb0efd2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: ShaoHe Feng <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to