From 3a919ddc5e13091f7212d9369e1794c038d6cdfe Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Wed, 20 Jun 2012 21:31:23 +0300 Subject: Fix error when .proto contains no Messages (e.g. just enums). Thanks to Paul Fertser for reporting this bug. --- generator/nanopb_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'generator') 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) -- cgit 1.2.3-korg