Ondřej Svoboda has uploaded a new change for review. Change subject: ifcfg: only deal gracefully with ENOENT in removeNic ......................................................................
ifcfg: only deal gracefully with ENOENT in removeNic Any other IO errors are unexpected and so they should not go unnoticed. Change-Id: Ice4d6b248e8ff43fc8b9deeef07484111a3a3ebd Bug-Url: https://bugzilla.redhat.com/1256252 Signed-off-by: Ondřej Svoboda <[email protected]> --- M vdsm/network/configurators/ifcfg.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/46197/1 diff --git a/vdsm/network/configurators/ifcfg.py b/vdsm/network/configurators/ifcfg.py index d05f797..b9ae745 100644 --- a/vdsm/network/configurators/ifcfg.py +++ b/vdsm/network/configurators/ifcfg.py @@ -661,7 +661,10 @@ hwlines = [line for line in nicFile if line.startswith( 'HWADDR=')] except IOError as e: - logging.warning("%s couldn't be read (errno %s)", cf, e.errno) + if e.errno != errno.ENOENT: + logging.error("%s couldn't be read (errno %s)", cf, e.errno) + raise + logging.warning("%s doesn't exist, reading HWADDR from system", cf) try: hwlines = ['HWADDR=%s\n' % netinfo.gethwaddr(nic)] except IOError as e: -- To view, visit https://gerrit.ovirt.org/46197 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice4d6b248e8ff43fc8b9deeef07484111a3a3ebd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ondřej Svoboda <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
