Change in vdsm[master]: Improve readability of _ownedIfcfg procedure
phoracek at redhat.com
phoracek at redhat.com
Tue Jun 23 12:02:01 UTC 2015
Petr Horáček has posted comments on this change.
Change subject: Improve readability of _ownedIfcfg procedure
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/42287/1/vdsm/network/configurators/ifcfg.py
File vdsm/network/configurators/ifcfg.py:
Line 499: return content.startswith(self.CONFFILE_HEADER_BASE)
Line 500: except IOError as e:
Line 501: if e.errno != os.errno.ENOENT:
Line 502: raise
Line 503: return False
> e.error == os.errno.ENOENT ?
Aha, sure! I like the original 'if err: return False else raise' because it starts with "positive" condition and makes more sense (to me), would you mind keeping that and changing just line 499?
Line 504:
Line 505: def _ownedFiles(self):
Line 506: for fpath in glob.iglob(netinfo.NET_CONF_DIR + '/*'):
Line 507: if self._ownedIfcfg(fpath):
--
To view, visit https://gerrit.ovirt.org/42287
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f6e4aaf919a5bec26d297cf01d83b9adf6a9461
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Pavel Zhukov <pzhukov at redhat.com>
Gerrit-Reviewer: Pavel Zhukov <pzhukov at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list