From 3ee90704bc813c47d8784b68c701bb72cebdf6ad Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 9 Feb 2016 07:30:23 +0100 Subject: [PATCH] [fix] save CACHE version in cache, otherwise don't make sens --- prosopopee/prosopopee.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 6b2899e..3ed77e9 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -39,11 +39,11 @@ class Cache(object): if os.path.exists(os.path.join(os.getcwd(), ".prosopopee_cache")): self.cache = json.load(open(self.cache_file_path, "r")) else: - self.cache = {"version": 1} + self.cache = {"version": CACHE_VERSION} if "version" not in self.cache or self.cache["version"] != CACHE_VERSION: print "info: cache format as changed, prune cache" - self.cache = {} + self.cache = {"version": CACHE_VERSION} def thumbnail_needs_to_be_generated(self, source, target, image): if not os.path.exists(target):