Skip to content
Permalink
Browse files

Fix #2130 -- Pillow==3.0.0 compatibility

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed Oct 2, 2015
1 parent 41bb4b2 commit 2bc4658077e1d759d2212e3a6016fd632a7e07d3
Showing with 4 additions and 2 deletions.
  1. +4 −2 nikola/image_processing.py
@@ -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):
@@ -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

0 comments on commit 2bc4658

Please sign in to comment.
You can’t perform that action at this time.