From 6a6b85d9e356c5af87da8adb554c1853cec74db8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 24 Oct 2017 11:12:19 +0200 Subject: [PATCH] m.images: make image grid working on Py3.4. https://stackoverflow.com/questions/12720450/unpacking-arguments-only-named-arguments-may-follow-expression --- pelican-plugins/m/images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pelican-plugins/m/images.py b/pelican-plugins/m/images.py index f68ac0f0..a6744218 100644 --- a/pelican-plugins/m/images.py +++ b/pelican-plugins/m/images.py @@ -184,7 +184,8 @@ class ImageGrid(rst.Directive): for k, v in im._getexif().items() if k in PIL.ExifTags.TAGS and len(str(v)) < 256 } - caption = "F{}, {}/{} s, ISO {}".format(float(exif['FNumber'][0])/float(exif['FNumber'][1]), *exif['ExposureTime'], exif['ISOSpeedRatings']) + # Can't use just *exif['ExposureTime'] on Py3.4 + caption = "F{}, {}/{} s, ISO {}".format(float(exif['FNumber'][0])/float(exif['FNumber'][1]), exif['ExposureTime'][0], exif['ExposureTime'][1], exif['ISOSpeedRatings']) rel_width = float(im.width)/im.height total_widths[-1] += rel_width rows[-1].append((uri, rel_width, len(total_widths) - 1, caption)) -- 2.30.2