comparison sat/memory/cache.py @ 3573:813595f88612

merge changes from main branch
author Goffi <goffi@goffi.org>
date Thu, 17 Jun 2021 13:05:58 +0200
parents b3fa179417e7
children 2863345c9bbb
comparison
equal deleted inserted replaced
3541:888109774673 3573:813595f88612
138 return None 138 return None
139 139
140 try: 140 try:
141 with cache_url.open("rb") as f: 141 with cache_url.open("rb") as f:
142 cache_data = pickle.load(f) 142 cache_data = pickle.load(f)
143 except IOError as e: 143 except (IOError, EOFError) as e:
144 log.warning(f"can't read cache at {cache_url}: {e}") 144 log.warning(f"can't read cache at {cache_url}: {e}")
145 return None 145 return None
146 except pickle.UnpicklingError: 146 except pickle.UnpicklingError:
147 log.warning(f"invalid cache found at {cache_url}") 147 log.warning(f"invalid cache found at {cache_url}")
148 return None 148 return None