changeset 209:475844e1d7a3

don't fail when image objects have no _getexif method
author Johannes Berg <johannes AT sipsolutions DOT net>
date Mon, 04 Aug 2008 13:10:18 +0200
parents 71fba6d8d138
children f983d1239a67
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Mon Aug 04 12:58:49 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Mon Aug 04 13:10:18 2008 +0200
@@ -555,7 +555,10 @@
            # XXX later, a unit conversion method for using other units than 'px' is needed
             if not cache.exists(self.request, webnail):
                 if not self.image_for_webnail:
-                    exif = im_obj._getexif()
+                    try:
+                        exif = im_obj._getexif()
+                    except AttributeError:
+                        exif = None
                     im_obj.thumbnail((int(self.webnail_width.strip('px')), int(self.webnail_width.strip('px'))), Image.ANTIALIAS)
                     if exif:
                         try: