From 3958c9eb9788416e990a012d3319e5157eff4916 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 15 Jan 2017 16:00:40 +0100 Subject: [PATCH] core (memory/cache): geFilePath now return None when uid is empty --- src/memory/cache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/memory/cache.py b/src/memory/cache.py index fc5f9b87..1f33ca3f 100644 --- a/src/memory/cache.py +++ b/src/memory/cache.py @@ -57,6 +57,9 @@ class Cache(object): @return (unicode, None): absolute path to cached file None if file is not in cache (or cache is invalid) """ + uid = uid.strip() + if not uid: + return None cache_url = self.getPath(uid) if not os.path.exists(cache_url): return None