Skip to content
Snippets Groups Projects
Commit 0fd85705 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

change args out-folder with out-path

parent 6b94c16f
No related branches found
No related tags found
1 merge request!217FIX/Include run number in out -folder path if missing
......@@ -769,17 +769,12 @@ def run():
caltype.upper(), datetime.now().isoformat())
if try_report_to_output:
if "out_folder" in args:
out_path = os.path.abspath(args["out_folder"])
if "run" in args:
if "run" in args and str(args["run"]) not in args["out_folder"]:
rr = args["run"]
# Only put run, when it is not in the folder path
# (e.g. out-folder from webservice conf)
if "r{:04d}/".format(rr) not in out_path and\
"{}".format(rr) not in out_path:
if isinstance(rr, int):
out_path = "{}/r{:04d}/".format(out_path, rr)
else:
out_path = "{}/{}/".format(out_path, rr)
# Only put run, when it is not in the out_folder
if isinstance(rr, int):
args["out_folder"] = "{}/{}/".format(args["out_folder"], rr)
out_path = os.path.abspath(args["out_folder"])
else:
print("No 'out_folder' defined as argument, outputting to '{}' instead.".format(
out_path))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment