Make bin/pyodide display help rather than crash

This commit is contained in:
Michael Droettboom 2019-01-15 10:09:09 -05:00
parent 89954025b8
commit 4d3095ab91
1 changed files with 5 additions and 2 deletions

7
pyodide_build/__main__.py Normal file → Executable file
View File

@ -19,8 +19,11 @@ def main():
parser.set_defaults(func=module.main)
args = main_parser.parse_args()
# run the selected action
args.func(args)
if hasattr(args, 'func'):
# run the selected action
args.func(args)
else:
main_parser.print_help()
if __name__ == '__main__':