core (memory/cache): geFilePath now return None when uid is empty
This commit is contained in:
parent
42f5bb6192
commit
3958c9eb97
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue