Handle all exceptions loading pickled data
The pickle file is just a local cache of Gerrit data. If we fail to load it, it will just be regenerated from Gerrit. We should never allow a failure in pickle.load to be fatal. Change-Id: If433fa5f335db8db63cdd264919c0dbeb3a7a32e
This commit is contained in:
parent
59d12c214e
commit
1bbf631545
@ -147,7 +147,9 @@ def get_changes(projects, ssh_user, ssh_key, only_open=False, stable='',
|
|||||||
with open(pickle_fn, 'r') as f:
|
with open(pickle_fn, 'r') as f:
|
||||||
try:
|
try:
|
||||||
changes = pickle.load(f)
|
changes = pickle.load(f)
|
||||||
except MemoryError:
|
except Exception:
|
||||||
|
logging.warning('Failed to load cached data from %s',
|
||||||
|
pickle_fn)
|
||||||
changes = {}
|
changes = {}
|
||||||
|
|
||||||
if not isinstance(changes, dict):
|
if not isinstance(changes, dict):
|
||||||
|
Loading…
Reference in New Issue
Block a user