mirror of https://github.com/pyodide/pyodide.git
Make bin/pyodide display help rather than crash
This commit is contained in:
parent
89954025b8
commit
4d3095ab91
|
@ -19,8 +19,11 @@ def main():
|
|||
parser.set_defaults(func=module.main)
|
||||
|
||||
args = main_parser.parse_args()
|
||||
if hasattr(args, 'func'):
|
||||
# run the selected action
|
||||
args.func(args)
|
||||
else:
|
||||
main_parser.print_help()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue