combined output dir check with the previous section

This commit is contained in:
K4YT3X
2022-04-14 03:33:22 +00:00
committed by GitHub
parent 22f656b800
commit a1d750e7ca

View File

@@ -586,10 +586,8 @@ def main() -> int:
if not args.input.is_file():
logger.critical("Input path is not a file")
return 1
# Output file won't exist yet, but the parent directory should.
if not args.output.parent.exists():
logger.critical(f"Output directory does not exist: {args.output}")
logger.critical(f"Output directory does not exist: {args.output.parent}")
return 1
# set logger level