log and continue on thumbnail generation exception

This commit is contained in:
Chris Dodge
2012-10-12 13:11:55 -04:00
parent 78df26605d
commit d31a7c6d6b

View File

@@ -127,8 +127,10 @@ class ContentStore(object):
'image/jpeg', thumbnail_file)
contentstore().save(thumbnail_content)
except:
pass # thumbnails are ultimately optional
except Exception, e:
# log and continue as thumbnails are generally considered as optional
logging.exception("Failed to generate thumbnail for {0}. Exception: {1}".format(content.location, str(e)))
return thumbnail_content