Caught a few errors.

This commit is contained in:
gabe 2021-09-27 14:52:02 -05:00
parent 08a5683906
commit 6e2bdb0c8d

View file

@ -45,11 +45,19 @@ def parse_arguments():
logging.info(f'outputting to {outFile.resolve()}') logging.info(f'outputting to {outFile.resolve()}')
logging.debug(f'compress is {compress}') logging.debug(f'compress is {compress}')
try:
with open(args.exclude_file, 'r') as file: with open(args.exclude_file, 'r') as file:
exclude=[glob.strip() for glob in file] exclude=[glob.strip() for glob in file]
if args.exclude != None: if args.exclude != None:
exclude.extend(args.exclude) exclude.extend(args.exclude)
except Exception as e:
print(str(e))
exit()
if args.inputDir.resolve().exists():
print(f'Inputdir {args.inputDir.resolve()} does not exist!')
exit()
return args.inputDir.resolve(), outFile, compress, exclude return args.inputDir.resolve(), outFile, compress, exclude