rikveenboer / nanopb

Automatically exported from code.google.com/p/nanopb
zlib License
0 stars 0 forks source link

Generator error when oneofs are in same file with enums with long_names:false #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a .proto file with long_names:false and a oneof field
2. Observe error:

Traceback (most recent call last):
  File "./nanopb/generator/nanopb_generator.py", line 1355, in <module>
    main_cli()
  File "./nanopb/generator/nanopb_generator.py", line 1305, in main_cli
    results = process_file(filename, None, options)
  File "./nanopb/generator/nanopb_generator.py", line 1260, in process_file
    enums, messages, extensions = parse_file(fdesc, file_options)
  File "./nanopb/generator/nanopb_generator.py", line 870, in parse_file
    if field.default in enum.value_longnames:
AttributeError: OneOf instance has no attribute 'default'

Original issue reported on code.google.com by Petteri.Aimonen on 26 Feb 2015 at 3:30

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 4a6580726ec2.

Original comment by Petteri.Aimonen on 26 Feb 2015 at 3:34