config: Print usage if no subcommand is given.

This commit is contained in:
Brett Smith 2017-05-19 10:21:33 -04:00
parent b1fda6a647
commit c8000a8a74

View file

@ -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: