Commit 4d3095ab authored by Michael Droettboom's avatar Michael Droettboom

Make bin/pyodide display help rather than crash

parent 89954025
...@@ -19,8 +19,11 @@ def main(): ...@@ -19,8 +19,11 @@ def main():
parser.set_defaults(func=module.main) parser.set_defaults(func=module.main)
args = main_parser.parse_args() args = main_parser.parse_args()
# run the selected action if hasattr(args, 'func'):
args.func(args) # run the selected action
args.func(args)
else:
main_parser.print_help()
if __name__ == '__main__': if __name__ == '__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment