Commit 2ac5be0a authored by Ondřej Borýsek's avatar Ondřej Borýsek
Browse files

Note possible race conditon

parent 7f77062f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@ class ProcessingSettings:
        if not pathlib.Path(filepath).is_file():
            return None

        # todo: here can occur a race condition - concurrent write and read resulting in invalid read of JSON
        with open(filepath, encoding="utf-8") as f:
            file_data = json.load(f)
            return ProcessingSettings.from_dict(file_data)