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)
|
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__':
|
||||||
|
|
Loading…
Reference in New Issue