aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-26 13:38:29 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-26 13:38:29 +0000
commitda0ceb22995640c766a929369bf4b704fcd33418 (patch)
tree41d4d5422d90ba880dcb059299b41ee8c11c6cdd /gm
parent57f74e0aa931e7784d47cba3ecc83020aa8e72b2 (diff)
rebaseline_server: delete invalid image files from local disk cache
BUG=skia:2247 NOTREECHECKS=True NOTRY=True R=borenet@google.com Author: epoger@google.com Review URL: https://codereview.chromium.org/211733004 git-svn-id: http://skia.googlecode.com/svn/trunk@13951 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/rebaseline_server/imagediffdb.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gm/rebaseline_server/imagediffdb.py b/gm/rebaseline_server/imagediffdb.py
index a53eb1fb96..8328543c93 100644
--- a/gm/rebaseline_server/imagediffdb.py
+++ b/gm/rebaseline_server/imagediffdb.py
@@ -387,7 +387,10 @@ def _open_image(filepath):
try:
return Image.open(filepath)
except IOError:
- logging.error('IOError loading image file %s' % filepath)
+ # If we are unable to load an image from the file, delete it from disk
+ # and we will try to fetch it again next time. Fixes http://skbug.com/2247
+ logging.error('IOError loading image file %s ; deleting it.' % filepath)
+ os.remove(filepath)
raise