Create cache file when missing

Damn it...
master
pictuga 2013-12-01 15:45:21 +01:00
parent 020c095194
commit 52fe67beb3
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ class Cache:
if not os.path.exists(self._dir): if not os.path.exists(self._dir):
os.makedirs(self._dir) os.makedirs(self._dir)
with open(self._file, 'w') as file: with open(self._file, 'w+') as file:
file.write(json.dumps(self._cache, indent=4)) file.write(json.dumps(self._cache, indent=4))
def isYoungerThan(self, sec): def isYoungerThan(self, sec):