From 52fe67beb3eb8bb2870339133a04ba79210f58b6 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 1 Dec 2013 15:45:21 +0100 Subject: [PATCH] Create cache file when missing Damn it... --- morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss.py b/morss.py index 76a609d..8c08c16 100644 --- a/morss.py +++ b/morss.py @@ -170,7 +170,7 @@ class Cache: if not os.path.exists(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)) def isYoungerThan(self, sec):