Mercurial > libervia-backend
changeset 2116:766dbbec56f2
core (memory/cache): geFilePath now return None when uid is empty
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 15 Jan 2017 16:00:40 +0100 |
parents | 3435e8d2e8e4 |
children | 627cc6120c0e |
files | src/memory/cache.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/memory/cache.py Mon Jan 09 23:10:16 2017 +0100 +++ b/src/memory/cache.py Sun Jan 15 16:00:40 2017 +0100 @@ -57,6 +57,9 @@ @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