summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2020-07-15 15:04:21 -0500
committerJohn Estabrook <jestabro@vyos.io>2020-07-15 15:04:21 -0500
commit305c0910f08c8b6772be0247cfc03fa0282478c8 (patch)
tree97e19b56cf66052c8605a61b08cd600b131562f6
parent32e2124d2df322b9ae0059db8c450371e3395009 (diff)
downloadvyos-1x-305c0910f08c8b6772be0247cfc03fa0282478c8.tar.gz
vyos-1x-305c0910f08c8b6772be0247cfc03fa0282478c8.zip
xml: T2588: defaults should return gracefully on key error
-rw-r--r--python/vyos/xml/definition.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/xml/definition.py b/python/vyos/xml/definition.py
index 5421007e0..b0339b228 100644
--- a/python/vyos/xml/definition.py
+++ b/python/vyos/xml/definition.py
@@ -248,7 +248,7 @@ class XML(dict):
def defaults(self, lpath, flat):
d = self[kw.default]
for k in lpath:
- d = d[k]
+ d = d.get(k, {})
if not flat:
r = {}