Skip to content

Commit

Permalink
fix final expansion of retrieve
Browse files Browse the repository at this point in the history
  • Loading branch information
pesser committed Aug 7, 2019
1 parent 1eac53a commit 15a1ed4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions edflow/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ def retrieve(
raise KeyNotFoundError(e)

visited += [key]
# final expansion of retrieved value
if expand and callable(list_or_dict):
list_or_dict = list_or_dict()
parent[last_key] = list_or_dict
except KeyNotFoundError as e:
if default is None:
print("Key not found: {}, seen: {}".format(keys, visited))
Expand Down

0 comments on commit 15a1ed4

Please sign in to comment.