Change in vdsm[master]: network: no need to log when network persistence path doesn'...
ibarkan at redhat.com
ibarkan at redhat.com
Thu Apr 30 07:27:11 UTC 2015
Ido Barkan has uploaded a new change for review.
Change subject: network: no need to log when network persistence path doesn't exist.
......................................................................
network: no need to log when network persistence path doesn't exist.
Running configuraiton may not exists in many cases and this is OK.
Those messages were contaminating supervdsm.log and are a source of
confusion and red herring.
Change-Id: I6f998b5ec7a5d0d07e35afdcc9a9d76b42b3c6a0
Signed-off-by: Ido Barkan <ibarkan at redhat.com>
---
M lib/vdsm/netconfpersistence.py
1 file changed, 7 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/40415/1
diff --git a/lib/vdsm/netconfpersistence.py b/lib/vdsm/netconfpersistence.py
index 436123c..26534eb 100644
--- a/lib/vdsm/netconfpersistence.py
+++ b/lib/vdsm/netconfpersistence.py
@@ -138,16 +138,14 @@
raise
def _getConfigs(self, path):
+ if not os.path.exists(path):
+ return {}
+
networkEntities = {}
- try:
- for fileName in os.listdir(path):
- fullPath = path + fileName
- networkEntities[fileName] = self._getConfigDict(fullPath)
- except OSError as ose:
- if ose.errno == errno.ENOENT:
- logging.debug('Non-existing config set.')
- else:
- raise
+
+ for fileName in os.listdir(path):
+ fullPath = path + fileName
+ networkEntities[fileName] = self._getConfigDict(fullPath)
return networkEntities
--
To view, visit https://gerrit.ovirt.org/40415
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f998b5ec7a5d0d07e35afdcc9a9d76b42b3c6a0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
More information about the vdsm-patches
mailing list