Change in vdsm[master]: net: init: wait for ipv4 with monitoring
ibarkan at redhat.com
ibarkan at redhat.com
Wed Sep 16 06:24:38 UTC 2015
Ido Barkan has posted comments on this change.
Change subject: net: init: wait for ipv4 with monitoring
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
nit
https://gerrit.ovirt.org/#/c/46148/3/init/wait_for_networks.py
File init/wait_for_networks.py:
Line 30: ipless_devs = set()
Line 31: for dev in devs:
Line 32: if getIpInfo(dev)[0] is '':
Line 33: ipless_devs.add(dev)
Line 34: return ipless_devs
could be written in set comprehension, if you like:
return set(dev for dev in devs if not getIpInfo(dev)[0])
and don't use 'is' in python except for object comparison. It is a bad practice because python pulls all sort of memory management optimizations, making many common values (like small integers!) singletones.
Line 35:
Line 36:
Line 37: def _wait_for_ipv4(devs):
Line 38: try:
--
To view, visit https://gerrit.ovirt.org/46148
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa9d53f8f436b5c5f11643ae03bdd768d555b83d
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list