Skip to content

Commit

Permalink
avoid recursion error in profile.merge (#5195)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Aug 10, 2021
1 parent a742de4 commit bd9a68c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion distributed/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ def merge(*args):
for child in arg["children"]:
children[child].append(arg["children"][child])

children = {k: merge(*v) for k, v in children.items()}
try:
children = {k: merge(*v) for k, v in children.items()}
except RecursionError:
children = {}
count = sum(arg["count"] for arg in args)
return {
"description": args[0]["description"],
Expand Down

0 comments on commit bd9a68c

Please sign in to comment.