projects
/
cdist.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fe7449
)
Correctly throw an error if a required setting is missing.
author
Carl Hetherington
<cth@carlh.net>
Sat, 18 Jun 2016 21:40:01 +0000
(22:40 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 18 Jun 2016 21:40:01 +0000
(22:40 +0100)
cdist
patch
|
blob
|
history
diff --git
a/cdist
b/cdist
index cf42ee7578e88c0520af98ca86fa1ef64d537b22..3aa09a3c62fd2e55e4e9a276b55719ab879221f7 100755
(executable)
--- a/
cdist
+++ b/
cdist
@@
-121,10
+121,10
@@
class Config:
def get(self, k):
for o in self.options:
if o.key == k:
+ if o.value is None:
+ raise Error('Required setting %s not found' % k)
return o.value
- raise Error('Required setting %s not found' % k)
-
def set(self, k, v):
for o in self.options:
o.offer(k, v)