From ed8822ee149a0f163406da3927ca9219594fce73 Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Thu, 18 Feb 2016 15:51:52 +0100 Subject: [PATCH] [fix] prevent rendering None as a string --- prosopopee/prosopopee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index df38d64..7c131b8 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -56,7 +56,7 @@ class Image(object): "auto-orient" : "-auto-orient" if options["auto-orient"] else "", "strip": "-strip" if options["strip"] else "", "quality": "-quality %s" % options["quality"] if options.has_key("quality") else "-define jpeg:preserve-settings", - "resize": "-resize %s" % options["resize"] if options.has_key("resize") else "" + "resize": "-resize %s" % options["resize"] if options.has_key("resize") and options["resize"] is not None else "" } command = "gm convert {source} {auto-orient} {strip} {quality} {resize} {target}".format(**gm_switches) print command