From 8aa650be25e886a38c3b6e33ab81db255aaf1038 Mon Sep 17 00:00:00 2001 From: surdouski Date: Sat, 21 Sep 2024 15:49:55 -0400 Subject: [PATCH] remove unnecessary rename --- mpstore/store.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mpstore/store.py b/mpstore/store.py index 6a76d12..aa2c94a 100644 --- a/mpstore/store.py +++ b/mpstore/store.py @@ -79,8 +79,5 @@ def _create_store_if_not_exists(path: str): if oserror.errno != 2: raise oserror - temp_path = path + TEMP_EXTENSION - print(temp_path) - with open(temp_path, "wb") as temp_f: - json.dump({}, temp_f) - os.rename(temp_path, path) + with open(path, "wb") as f: + json.dump({}, f)