We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c81e3e7 commit 542a3c3Copy full SHA for 542a3c3
jsonstore.py
@@ -53,7 +53,14 @@ def _save(self):
53
with open(temp, "wb") as store:
54
output = json.dumps(self._data, indent=self._indent)
55
store.write(output.encode("utf-8"))
56
- os.rename(temp, self._path)
+
57
+ if sys.version_info >= (3, 3):
58
+ os.replace(temp, self._path)
59
+ elif os.name == "windows":
60
+ os.remove(self._path)
61
+ os.rename(temp, self._path)
62
+ else:
63
64
65
def __init__(self, path, indent=2, auto_commit=True):
66
self.__dict__.update(
0 commit comments