Don't blow up on a MemoryError

My VM that re-generates the stats is now breaking on a MemoryError when trying
load the local cache.  Ignore this for now since it will fall back to querying
gerrit.

Change-Id: I151fae89d9fb9a45d72e72c5aade4cb3342b4267
changes/73/75973/1
Russell Bryant 9 years ago
parent 5008559e81
commit 904e55d76c

@ -81,7 +81,10 @@ def get_changes(projects, ssh_user, ssh_key, only_open=False, stable='',
mtime = os.stat(pickle_fn).st_mtime
if (time.time() - mtime) <= CACHE_AGE:
with open(pickle_fn, 'r') as f:
changes = pickle.load(f)
try:
changes = pickle.load(f)
except MemoryError:
changes = None
if not changes:
while True:

Loading…
Cancel
Save