From 60ed07f6494790e5e40a0a5441d92d621c161e4e Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Wed, 25 Aug 2021 12:42:04 +0200 Subject: [PATCH] open statement wasn't committed entirely --- mlair/data_handler/default_data_handler.py | 2 +- mlair/run_modules/pre_processing.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mlair/data_handler/default_data_handler.py b/mlair/data_handler/default_data_handler.py index 03858f8b..687bdd88 100644 --- a/mlair/data_handler/default_data_handler.py +++ b/mlair/data_handler/default_data_handler.py @@ -370,6 +370,6 @@ def f_proc(data_handler, station, return_strategy="", tmp_path=None, **sp_keys): return res, station else: _tmp_file = os.path.join(tmp_path, f"{station}_{'%032x' % random.getrandbits(128)}.pickle") - with open(os.path.join(tmp_path, _tmp_file), "wb") as f: + with open(_tmp_file, "wb") as f: dill.dump(res, f) return _tmp_file, station diff --git a/mlair/run_modules/pre_processing.py b/mlair/run_modules/pre_processing.py index e3793651..a46a57bd 100644 --- a/mlair/run_modules/pre_processing.py +++ b/mlair/run_modules/pre_processing.py @@ -324,7 +324,7 @@ class PreProcessing(RunEnvironment): def f_proc(data_handler, station, name_affix, store, return_strategy="", tmp_path=None, **kwargs): """ Try to create a data handler for given arguments. If build fails, this station does not fulfil all requirements and - therefore f_proc will return None as indication. On a successfull build, f_proc returns the built data handler and + therefore f_proc will return None as indication. On a successful build, f_proc returns the built data handler and the station that was used. This function must be implemented globally to work together with multiprocessing. """ assert return_strategy in ["result", "reference"] @@ -342,7 +342,7 @@ def f_proc(data_handler, station, name_affix, store, return_strategy="", tmp_pat if tmp_path is None: tmp_path = os.getcwd() _tmp_file = os.path.join(tmp_path, f"{station}_{'%032x' % random.getrandbits(128)}.pickle") - with open(os.path.join(tmp_path, _tmp_file), "wb") as f: + with open(_tmp_file, "wb") as f: dill.dump(res, f) return _tmp_file, station -- GitLab