Move logging setup earlier

Move logging setup to capture output from the help command as well.

Change-Id: I38ef6cfa4eef02c05d5983929e0fa9a0f99865a7
This commit is contained in:
Darragh Bailey
2015-12-13 18:56:55 +00:00
parent f0f03b4c91
commit 394a9b762f

View File

@@ -128,12 +128,12 @@ def main(argv=None):
argcomplete.autocomplete(parser)
args = parser.parse_args(argv)
logger = setup_console_logging(args)
if args.cmd.name == "help":
args.cmd.run(args, parser)
return 0
logger = setup_console_logging(args)
if git.Git().version_info < (1, 7, 5):
logger.fatal("Git-Upstream requires git version 1.7.5 or later")
sys.exit(1)