Commit 90097f31 authored by Michal Nowikowski's avatar Michal Nowikowski

[#372,!181] hammer: added printing help when no command is provided

parent 8b1f0055
...@@ -1364,7 +1364,7 @@ def parse_args(): ...@@ -1364,7 +1364,7 @@ def parse_args():
args = main_parser.parse_args() args = main_parser.parse_args()
return args return args, main_parser
def list_supported_systems(): def list_supported_systems():
...@@ -1547,7 +1547,7 @@ def build_cmd(args): ...@@ -1547,7 +1547,7 @@ def build_cmd(args):
def main(): def main():
"""Main function - parse args and invoke proper command.""" """Main function - parse args and invoke proper command."""
args = parse_args() args, parser = parse_args()
# prepare logging # prepare logging
level = logging.INFO level = logging.INFO
...@@ -1585,6 +1585,9 @@ def main(): ...@@ -1585,6 +1585,9 @@ def main():
elif args.command == "destroy": elif args.command == "destroy":
destroy_system(args.directory) destroy_system(args.directory)
else:
parser.print_help()
if __name__ == '__main__': if __name__ == '__main__':
main() 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