summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2017-12-03 23:18:25 +0100
committerAndrej Rode <mail@andrejro.de>2017-12-03 23:18:25 +0100
commitc7c77d2dfa934697268db204745341a72be924a0 (patch)
tree7c0c0a8b2068d783cf8fb1ce8fc622d87810cc12
parentaef3518c020599edbc5535c8f1e600628c76093f (diff)
grc: fix json cache dumping to work with python 3.5
-rw-r--r--grc/core/cache.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/grc/core/cache.py b/grc/core/cache.py
index b72255ce1f..f438d58bd9 100644
--- a/grc/core/cache.py
+++ b/grc/core/cache.py
@@ -73,8 +73,8 @@ class Cache(object):
return
logger.info('Saving %d entries to json cache', len(self.cache))
- with open(self.cache_file, 'wb') as cache_file:
- json.dump(self.cache, cache_file, encoding='utf-8')
+ with open(self.cache_file, 'w', encoding='utf8') as cache_file:
+ json.dump(self.cache, cache_file)
def prune(self):
for filename in (set(self.cache) - self._accessed_items):