From 55203581a352d35dc33ef6432c01fe8a126b4e71 Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Wed, 18 Aug 2021 19:15:38 +0200 Subject: [PATCH] apply fix and check for validity, /close #320 on success --- mlair/data_handler/data_handler_single_station.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mlair/data_handler/data_handler_single_station.py b/mlair/data_handler/data_handler_single_station.py index 4330efd9..3392e416 100644 --- a/mlair/data_handler/data_handler_single_station.py +++ b/mlair/data_handler/data_handler_single_station.py @@ -262,6 +262,8 @@ class DataHandlerSingleStation(AbstractDataHandler): hash = self._get_hash() filename = os.path.join(self.lazy_path, hash + ".pickle") try: + if self.overwrite_local_data is True: + raise FileNotFoundError with open(filename, "rb") as pickle_file: lazy_data = dill.load(pickle_file) self._extract_lazy(lazy_data) -- GitLab