[node-patches] Change in ovirt-node[master]: defaults: Raise descriptive error
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Fri May 10 17:23:56 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: defaults: Raise descriptive error
......................................................................
defaults: Raise descriptive error
Change-Id: I911cb6813f71c8a8a3976d323d1bc1a144bc7445
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/config/defaults.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/57/14657/1
diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index 048c03a..1894fc0 100644
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -64,6 +64,8 @@
def __init__(self, filename):
super(SimpleProvider, self).__init__()
self.filename = filename
+ if not os.path.exists(self.filename):
+ raise RuntimeError("File does not exist: %s" % self.filename)
self.logger.debug("Using %s" % self.filename)
def update(self, new_dict, remove_empty):
--
To view, visit http://gerrit.ovirt.org/14657
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I911cb6813f71c8a8a3976d323d1bc1a144bc7445
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list