Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3031)

Unified Diff: appengine/findit/util_scripts/local_cache.py

Issue 2432203003: [Predator] Run predator. (Closed)
Patch Set: Rebase. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/util_scripts/iterator.py ('k') | appengine/findit/util_scripts/script_util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/util_scripts/local_cache.py
diff --git a/appengine/findit/util_scripts/local_cache.py b/appengine/findit/util_scripts/local_cache.py
index a1554554a0263f1662e4a2ba4bbe2dcbc6c6059f..a010228a4dac5c71998c9d35b0d07cb8f63e482d 100644
--- a/appengine/findit/util_scripts/local_cache.py
+++ b/appengine/findit/util_scripts/local_cache.py
@@ -33,8 +33,7 @@ class LocalCacher(Cacher):
with open(path) as f:
return pickle.loads(zlib.decompress(f.read()))
except Exception as error: # pragma: no cover.
- logging.exception('Failed loading cache: %s', error)
- return None
+ raise Exception('Failed loading cache: %s' % error)
def Set(self, key, data, expire_time=0): # pylint: disable=W
with LocalCacher.lock:
@@ -42,4 +41,4 @@ class LocalCacher(Cacher):
with open(os.path.join(self.cache_dir, key), 'wb') as f:
f.write(zlib.compress(pickle.dumps(data)))
except Exception as e: # pragma: no cover.
- logging.exception('Failed setting cache for key %s: %s', key, e)
+ raise Exception('Failed setting cache for key %s: %s' % (key, e))
« no previous file with comments | « appengine/findit/util_scripts/iterator.py ('k') | appengine/findit/util_scripts/script_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698