From 840c7b9acbcc29080b3d003ff9d5b825b44c52c3 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Wed, 30 Oct 2013 19:40:21 -0600 Subject: [PATCH] Closes #397. Fixed Viewer.show to return properly. Viewer.show did not return a value, however ImageShow.show expected Viewer.show to return a non-falsey value if successful. Therefor ImageShow.show would continue to call multiple viewers. --- PIL/ImageShow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py index 7e3d63ba3..78bc210f3 100644 --- a/PIL/ImageShow.py +++ b/PIL/ImageShow.py @@ -65,7 +65,7 @@ class Viewer: if base != image.mode and image.mode != "1": image = image.convert(base) - self.show_image(image, **options) + return self.show_image(image, **options) # hook methods