Skip to content

Commit

Permalink
Fix #2130 -- Pillow==3.0.0 compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Oct 2, 2015
1 parent 41bb4b2 commit 2bc4658
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nikola/image_processing.py
Expand Up @@ -132,7 +132,7 @@ def resize_svg(self, src, dst, max_size, bigger_panoramas):
op.write(lxml.etree.tostring(tree))
op.close()
except (KeyError, AttributeError) as e:
self.logger.warn("No width/height in %s. Actuall exception: %s" % (src, e))
self.logger.warn("No width/height in %s. Original exception: %s" % (src, e))
utils.copy_file(src, dst)

def image_date(self, src):
Expand All @@ -148,8 +148,10 @@ def image_date(self, src):
decoded = ExifTags.TAGS.get(tag, tag)
if decoded in ('DateTimeOriginal', 'DateTimeDigitized'):
try:
if isinstance(value, tuple):
value = value[0]
self.dates[src] = datetime.datetime.strptime(
value, r'%Y:%m:%d %H:%M:%S')
value, '%Y:%m:%d %H:%M:%S')
break
except ValueError: # Invalid EXIF date.
pass
Expand Down

0 comments on commit 2bc4658

Please sign in to comment.