aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/utils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/utils.py b/scripts/utils.py
index e3038e4..522a68d 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -58,8 +58,14 @@ def callsubprocess(process_name, process, show_output = True,
return_output = False, env=os.environ, allowed_exit_codes = [0]):
sprc = subprocess.Popen(process, stdout = subprocess.PIPE, env = env)
+ try:
+ os.mkdir(os.path.join(sf(conf.log_folder), process_name))
+ except OSError:
+ pass
+
+ rtn = []
with open(os.path.join(sf(conf.log_folder),
- process_name + '-' + time.strftime("%y-%m-%d-%H-%M-%S") + ".log"),
+ process_name, time.strftime("%y-%m-%d-%H-%M-%S") + ".log"),
"a") as f:
f.write('::' + time.strftime("%y-%m-%d-%H-%M-%S-%f") + '::\n')
for linen in sprc.stdout: