Skip to content
Snippets Groups Projects

FIX/Include run number in out -folder path if missing

Merged Karim Ahmed requested to merge fix/xfel_calibrate_update_bugs into master
All threads resolved!
Files
2
@@ -792,6 +792,16 @@ def run():
if try_report_to_output:
if "out_folder" in args:
out_path = os.path.abspath(args["out_folder"])
if "run" in args:
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)
else:
print("No 'out_folder' defined as argument, outputting to '{}' instead.".format(
out_path))
Loading