Change in vdsm[master]: netinfo: be fine with an ifcfg missing, but fail on other er...

osvoboda at redhat.com osvoboda at redhat.com
Fri Feb 12 12:06:59 UTC 2016


Ondřej Svoboda has uploaded a new change for review.

Change subject: netinfo: be fine with an ifcfg missing, but fail on other errors
......................................................................

netinfo: be fine with an ifcfg missing, but fail on other errors

Change-Id: I6db32b1ad8aaa5e3543e8a19e76a347409811b0b
Bug-Url: https://bugzilla.redhat.com/1141267
Signed-off-by: Ondřej Svoboda <osvoboda at redhat.com>
---
M lib/vdsm/netinfo/misc.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/53470/1

diff --git a/lib/vdsm/netinfo/misc.py b/lib/vdsm/netinfo/misc.py
index 0ef5010..ed3adaf 100644
--- a/lib/vdsm/netinfo/misc.py
+++ b/lib/vdsm/netinfo/misc.py
@@ -19,6 +19,7 @@
 #
 
 from __future__ import absolute_import
+import errno
 import shlex
 import socket
 
@@ -43,8 +44,10 @@
                 if k in _IFCFG_ZERO_SUFFIXED:
                     k = k[:-1]
                 ifaceCfg[k] = v
-    except Exception:
-        pass
+    except IOError as e:
+        if e.errno == errno.ENOENT:
+            # ifcfg files are not used by iproute2 and pyroute2 configurators
+            pass
     return ifaceCfg
 
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6db32b1ad8aaa5e3543e8a19e76a347409811b0b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>


More information about the vdsm-patches mailing list