Commit 326b3e1d authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fixed bug: wrong test. Added verbosity

parent 2d7a73c7
......@@ -11,9 +11,9 @@ parser.add_argument('--output', '-o', required=True, help='The name of the outpu
args = parser.parse_args()
# check if output directory exists and create it if not
output_dir = args.output
if os.path.exists(output_dir) and os.path.isdir(output_dir):
print("Output exists and is not a directory")
output_dir = os.path.abspath(args.output)
if os.path.exists(output_dir) and not os.path.isdir(output_dir):
print("Output " + output_dir + " exists and is not a directory")
exit(1)
if not os.path.exists(output_dir):
os.mkdir(output_dir)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment