core (memory/cache): geFilePath now return None when uid is empty

This commit is contained in:
Goffi 2017-01-15 16:00:40 +01:00
commit 3958c9eb97

View file

@ -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