Browse Source

Merge pull request #113 from enricobacis/patch-1

Correctly use the subparser widgets dictionary
pull/114/merge
Chris 9 years ago
parent
commit
78b0b005ec
1 changed files with 2 additions and 1 deletions
  1. 3
      gooey/python_bindings/argparse_to_json.py

3
gooey/python_bindings/argparse_to_json.py

@ -45,7 +45,8 @@ def convert(parser):
if has_required(actions):
raise UnsupportedConfiguration("Gooey doesn't currently support required arguments when subparsers are present.")
layout_type = 'column'
layout_data = {name.lower(): process(sub_parser, widget_dict) for name, sub_parser in get_subparser(actions).choices.iteritems()}
layout_data = {name.lower(): process(sub_parser, getattr(sub_parser, 'widgets', {}))
for name, sub_parser in get_subparser(actions).choices.iteritems()}
else:
layout_type = 'standard'
layout_data = process(parser, widget_dict)

Loading…
Cancel
Save