Index: gm/rebaseline_server/imagediffdb.py |
diff --git a/gm/rebaseline_server/imagediffdb.py b/gm/rebaseline_server/imagediffdb.py |
index a53eb1fb96d1c704fe9410be2bfbe8b22c54864a..8328543c935d77bbdc011701d85356c78fe9270f 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) |
borenet
2014/03/26 13:17:21
Is there a chance that the file may not exist? I
epoger
2014/03/26 13:38:12
I suppose it's possible. For the reason you menti
|
raise |