Skip to content

Commit

Permalink
Protect media library from get_image_dimensions failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Yomadorr committed Apr 10, 2012
1 parent a20fc95 commit 1df965f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion feincms/module/medialibrary/models.py
Expand Up @@ -175,7 +175,7 @@ def file_type(self):
from django.core.files.images import get_image_dimensions
d = get_image_dimensions(self.file.file)
if d: t += " %d×%d" % ( d[0], d[1] )
except IOError, e:
except (IOError, ValueError), e:
t += " (%s)" % e.strerror
return t
file_type.admin_order_field = 'type'
Expand Down

0 comments on commit 1df965f

Please sign in to comment.