From b687bc8c433d5c62fcaec1e88b046b3f88d3ca92 Mon Sep 17 00:00:00 2001 From: gac-x11ma Date: Wed, 15 May 2019 14:19:50 +0200 Subject: [PATCH] Script execution --- script/templates/EnergyScan.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/templates/EnergyScan.py b/script/templates/EnergyScan.py index 95cb446..70e3c06 100644 --- a/script/templates/EnergyScan.py +++ b/script/templates/EnergyScan.py @@ -1,4 +1,5 @@ #Script imported and adopted from: XTREME beamline +import time #Parameters @@ -137,7 +138,10 @@ try: #newName = get_exec_pars().path + "/" + time.strftime("%Y%m%d_%H%M_", start) + FILE + ".txt"; import time - os.makedirs(get_exec_pars().path) + try: + os.makedirs(get_exec_pars().path) + except: + pass newName = get_exec_pars().path + "/" + time.strftime("%Y%m%d_%H%M_", start) + FILE + ".txt"; name = getNewestFile()