Commit efa93d42 by Toshio Kuratomi

Reverse the error messages from jsonfile get and set

parent 9bd2e3b7
...@@ -60,7 +60,7 @@ class CacheModule(BaseCacheModule): ...@@ -60,7 +60,7 @@ class CacheModule(BaseCacheModule):
try: try:
f = codecs.open(cachefile, 'r', encoding='utf-8') f = codecs.open(cachefile, 'r', encoding='utf-8')
except (OSError,IOError), e: except (OSError,IOError), e:
utils.warning("error while trying to write to %s : %s" % (cachefile, str(e))) utils.warning("error while trying to read %s : %s" % (cachefile, str(e)))
else: else:
value = json.load(f) value = json.load(f)
self._cache[key] = value self._cache[key] = value
...@@ -76,7 +76,7 @@ class CacheModule(BaseCacheModule): ...@@ -76,7 +76,7 @@ class CacheModule(BaseCacheModule):
try: try:
f = codecs.open(cachefile, 'w', encoding='utf-8') f = codecs.open(cachefile, 'w', encoding='utf-8')
except (OSError,IOError), e: except (OSError,IOError), e:
utils.warning("error while trying to read %s : %s" % (cachefile, str(e))) utils.warning("error while trying to write to %s : %s" % (cachefile, str(e)))
else: else:
f.write(utils.jsonify(value)) f.write(utils.jsonify(value))
finally: finally:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment