diff --git a/mlair/data_handler/data_handler_single_station.py b/mlair/data_handler/data_handler_single_station.py index 4330efd9ee5d3ae8a64c6eb9b95a0c58e18b3c36..3392e41631fb395e95fc15b9199d81e1fd02121d 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)