aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generator/nanopb_generator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index d41efb88..1e7e1f98 100644
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -343,7 +343,7 @@ def toposort2(data):
'''
for k, v in data.items():
v.discard(k) # Ignore self dependencies
- extra_items_in_deps = reduce(set.union, data.values()) - set(data.keys())
+ extra_items_in_deps = reduce(set.union, data.values(), set()) - set(data.keys())
data.update(dict([(item, set()) for item in extra_items_in_deps]))
while True:
ordered = set(item for item,dep in data.items() if not dep)