Mercurial > libervia-backend
diff src/memory/cache.py @ 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 | 85f3e12e984d |
children | 1b3fbb76984b |
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