From c8000a8a747c0086051e244505b89323d770ae75 2017-05-19 14:21:33 From: Brett Smith Date: 2017-05-19 14:21:33 Subject: [PATCH] config: Print usage if no subcommand is given. --- diff --git a/oxrlib/config.py b/oxrlib/config.py index 186691eedfd3e0066adea9f4782c5469a82318c5..9a35c4f68c7c14047e00866dc9abf307669af99a 100644 --- a/oxrlib/config.py +++ b/oxrlib/config.py @@ -40,6 +40,9 @@ class Configuration: if read_path != expected_path: self.error("failed to read configuration file {!r}".format(expected_path)) + if not hasattr(self.args, 'command'): + argparser.print_help() + exit(2) try: post_hook = getattr(self, '_post_hook_' + self.args.command) except AttributeError: