forked from uncloud/uncloud
Allow to not have keys in etcd
This commit is contained in:
parent
71c3f9d978
commit
9662e02eb7
1 changed files with 7 additions and 1 deletions
|
@ -115,7 +115,13 @@ class Settings(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
self.read_values_from_etcd()
|
# Allow failing to read from etcd if we have
|
||||||
|
# it locally
|
||||||
|
try:
|
||||||
|
self.read_values_from_etcd()
|
||||||
|
except KeyError as e:
|
||||||
|
pass
|
||||||
|
|
||||||
return self.config_parser[key]
|
return self.config_parser[key]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue