comparison 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
comparison
equal deleted inserted replaced
2115:3435e8d2e8e4 2116:766dbbec56f2
55 55
56 @param uid(unicode): unique identifier of file 56 @param uid(unicode): unique identifier of file
57 @return (unicode, None): absolute path to cached file 57 @return (unicode, None): absolute path to cached file
58 None if file is not in cache (or cache is invalid) 58 None if file is not in cache (or cache is invalid)
59 """ 59 """
60 uid = uid.strip()
61 if not uid:
62 return None
60 cache_url = self.getPath(uid) 63 cache_url = self.getPath(uid)
61 if not os.path.exists(cache_url): 64 if not os.path.exists(cache_url):
62 return None 65 return None
63 66
64 try: 67 try: