diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-06-20 21:31:23 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-06-20 21:31:23 +0300 |
commit | 3a919ddc5e13091f7212d9369e1794c038d6cdfe (patch) | |
tree | dbe7a502bdea54e6909ea3bfd2e9ee9c1549e217 | |
parent | 0f1d5cca59a2fddcf6bc627bb35e207bf3889547 (diff) |
Fix error when .proto contains no Messages (e.g. just enums).
Thanks to Paul Fertser for reporting this bug.
-rw-r--r-- | generator/nanopb_generator.py | 2 |
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) |