Change in vdsm[master]: network: don't log missing brif files

edwardh at redhat.com edwardh at redhat.com
Sun Feb 7 14:27:26 UTC 2016


Edward Haas has posted comments on this change.

Change subject: network: don't log missing brif files
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/53095/2/lib/vdsm/netinfo/bridges.py
File lib/vdsm/netinfo/bridges.py:

Line 29: 
Line 30: bridges = partial(visible_devs, Link.isBRIDGE)
Line 31: 
Line 32: 
Line 33: def ports(bridge):
Sorry for the basic question, but why do we need to log when there are no ports on a bridge?
It's up to the caller to decide if it is acceptable or not, no?
Line 34:     brif_path = os.path.join('/sys/class/net', bridge, 'brif')
Line 35:     if os.path.isfile(brif_path):
Line 36:         bridge_ports = os.listdir(brif_path)
Line 37:     else:


Line 35: if os.path.isfile(brif_path):
Wouldn't an exception fit here better?


-- 
To view, visit https://gerrit.ovirt.org/53095
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e9feb565b69f097aeb2d2725e2f668cf43fea8b
Gerrit-PatchSet: 2
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: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list