diff options
author | John Estabrook <jestabro@vyos.io> | 2020-07-15 15:04:21 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2020-07-15 15:04:21 -0500 |
commit | 305c0910f08c8b6772be0247cfc03fa0282478c8 (patch) | |
tree | 97e19b56cf66052c8605a61b08cd600b131562f6 | |
parent | 32e2124d2df322b9ae0059db8c450371e3395009 (diff) | |
download | vyos-1x-305c0910f08c8b6772be0247cfc03fa0282478c8.tar.gz vyos-1x-305c0910f08c8b6772be0247cfc03fa0282478c8.zip |
xml: T2588: defaults should return gracefully on key error
-rw-r--r-- | python/vyos/xml/definition.py | 2 |
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 = {} |