Fix for string key traversal bug #1321827
Gracefully handle the traversal of strings in a key search path. Closes-Bug: #1321827 Change-Id: I1fab13905fc1f6ed2817081d58fcc5379f2a8515
This commit is contained in:
parent
6e9aa57e13
commit
e3aa1631c1
@ -82,7 +82,7 @@ def print_key(
|
||||
for key in keys:
|
||||
try:
|
||||
config = config[key]
|
||||
except KeyError:
|
||||
except (KeyError, TypeError):
|
||||
if default is not None:
|
||||
print(str(default))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user