Allow to not have keys in etcd

This commit is contained in:
Nico Schottelius 2019-12-31 13:50:56 +01:00
parent 71c3f9d978
commit 9662e02eb7

View file

@ -115,7 +115,13 @@ class Settings(object):
)
def __getitem__(self, key):
# 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]