Merge pull request #881 from MITx/fix/cdodge/cas-thumbnail-exception-handling

swallow exceptions when generating thumbnails
This commit is contained in:
Calen Pennington
2012-10-12 10:12:36 -07:00

View File

@@ -127,8 +127,10 @@ class ContentStore(object):
'image/jpeg', thumbnail_file)
contentstore().save(thumbnail_content)
except:
raise
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