From 79f9fbd50efc23217ef28184a09d685b51c39aee Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 9 Apr 2015 10:40:04 -0700 Subject: [PATCH] Reverse the error messages from jsonfile get and set --- lib/ansible/cache/jsonfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/cache/jsonfile.py b/lib/ansible/cache/jsonfile.py index 93ee69903be..9c45dc22fd7 100644 --- a/lib/ansible/cache/jsonfile.py +++ b/lib/ansible/cache/jsonfile.py @@ -60,7 +60,7 @@ class CacheModule(BaseCacheModule): try: f = codecs.open(cachefile, 'r', encoding='utf-8') 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: value = json.load(f) self._cache[key] = value @@ -76,7 +76,7 @@ class CacheModule(BaseCacheModule): try: f = codecs.open(cachefile, 'w', encoding='utf-8') 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: f.write(utils.jsonify(value)) finally: