Fix docopt handling

* Show usage if invalid arguments are used
This commit is contained in:
2Shirt 2019-04-11 22:25:13 -07:00
parent 0883b099fd
commit b2528b90f8
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -20,6 +20,13 @@ set_log_file('Build UFD ({Date-Time}).log'.format(**global_vars))
if __name__ == '__main__':
try:
args = docopt(DOCSTRING)
except SystemExit as err:
# Catch docopt exits
print(err)
exit_script()
except:
major_exception()
try:
sources = OrderedDict()
# Verify selections