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
This commit is contained in:
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
|
mtime = os.stat(pickle_fn).st_mtime
|
||||||
if (time.time() - mtime) <= CACHE_AGE:
|
if (time.time() - mtime) <= CACHE_AGE:
|
||||||
with open(pickle_fn, 'r') as f:
|
with open(pickle_fn, 'r') as f:
|
||||||
changes = pickle.load(f)
|
try:
|
||||||
|
changes = pickle.load(f)
|
||||||
|
except MemoryError:
|
||||||
|
changes = None
|
||||||
|
|
||||||
if not changes:
|
if not changes:
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue