From 491b050f2508fcd4a49dbe5cac919d9baac91277 Mon Sep 17 00:00:00 2001 From: dave <dave@dtu.dk> Date: Sat, 11 Jun 2016 14:16:10 +0200 Subject: [PATCH] prepost.Simulations: use os.join.path when building paths --- wetb/prepost/Simulations.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py index b4d2625f..e8028659 100755 --- a/wetb/prepost/Simulations.py +++ b/wetb/prepost/Simulations.py @@ -1487,7 +1487,8 @@ class HtcMaster(object): # --------------------------------------------------------------------- # create the zipfile object locally - zf = zipfile.ZipFile(model_dir_local + self.tags['[model_zip]'],'w') + fname = os.path.join(model_dir_local, self.tags['[model_zip]']) + zf = zipfile.ZipFile(fname, 'w') # empty folders, the'll hold the outputs # zf.write(source, target in zip, ) @@ -1576,8 +1577,8 @@ class HtcMaster(object): # --------------------------------------------------------------------- # copy zip file to the server, this will be used on the nodes - src = model_dir_local + self.tags['[model_zip]'] - dst = model_dir_server + self.tags['[model_zip]'] + src = os.path.join(model_dir_local, self.tags['[model_zip]']) + dst = os.path.join(model_dir_server, self.tags['[model_zip]']) # in case we are running local and the model dir is the server dir # we do not need to copy the zip file, it is already on location -- GitLab