Browse Source

Fixed dumb bug where any supplied type was defaulting to FileChooser

pull/90/merge
chriskiehl 10 years ago
parent
commit
c751e767f6
1 changed files with 1 additions and 1 deletions
  1. 2
      gooey/python_bindings/argparse_to_json.py

2
gooey/python_bindings/argparse_to_json.py

@ -68,7 +68,7 @@ def convert(parser):
def get_widget(action, widgets): def get_widget(action, widgets):
supplied_widget = widgets.get(action.dest, None) supplied_widget = widgets.get(action.dest, None)
type_arg_widget = 'FileChooser' if type(action.type) == type(argparse.FileType) else None
type_arg_widget = 'FileChooser' if action.type == argparse.FileType else None
return supplied_widget or type_arg_widget or None return supplied_widget or type_arg_widget or None

Loading…
Cancel
Save