commit | 1cffb7074295c508c897d03ee917f82c51db696c | [log] [tgz] |
---|---|---|
author | Jose Fonseca <jfonseca@vmware.com> | Tue May 23 17:29:59 2017 +0100 |
committer | Jose Fonseca <jfonseca@vmware.com> | Tue May 23 17:29:59 2017 +0100 |
tree | ce089f2d108a575ee6af76e8502171874dd3c848 | |
parent | 42628efd4abc2795ae3c3cf12b75319061bdff2c [diff] [blame] |
scripts: Skip thumbnail when it can't be written. Useful when reference screenshots are on a read-only share.
diff --git a/scripts/snapdiff.py b/scripts/snapdiff.py index 6e596df..99ad8fd 100755 --- a/scripts/snapdiff.py +++ b/scripts/snapdiff.py
@@ -142,7 +142,10 @@ return im.thumbnail((thumbSize, thumbSize)) - im.save(thumb) + try: + im.save(thumb) + except IOError: + thumb = image else: thumb = image html.write(' <td><a href="%s"><img src="%s"/></a></td>\n' % (image, thumb))