From 18a5400982f1de699254f8e911a04969531e92e9 Mon Sep 17 00:00:00 2001
From: Steffen Hauf <steffen.hauf@xfel.eu>
Date: Mon, 26 Aug 2019 15:52:35 +0200
Subject: [PATCH] Always create output folder

---
 xfel_calibrate/calibrate.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xfel_calibrate/calibrate.py b/xfel_calibrate/calibrate.py
index a5b73eace..8e73594a2 100755
--- a/xfel_calibrate/calibrate.py
+++ b/xfel_calibrate/calibrate.py
@@ -676,8 +676,8 @@ def run():
             else:
                 print("No 'out_folder' defined as argument, outputting to '{}' instead.".format(
                     out_path))
-        else:
-            os.makedirs(out_path)
+
+        os.makedirs(out_path, exist_ok=True)
         cmd = ('"from cal_tools.tools import finalize; ' +
                'finalize({{joblist}}, $1, \'{run_path}\', \'{out_path}\', ' +
                '\'{project}\', \'{calibration}\', \'{author}\', '
-- 
GitLab