From d92b1678fe2b27984995c18ea564d6bfae2d0d57 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 25 Feb 2017 19:35:29 +1100 Subject: [PATCH] Corrected ImageDraw floodfill exception type --- PIL/ImageDraw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/ImageDraw.py b/PIL/ImageDraw.py index 838983652..ddf669f78 100644 --- a/PIL/ImageDraw.py +++ b/PIL/ImageDraw.py @@ -334,7 +334,7 @@ def floodfill(image, xy, value, border=None): if background == value: return # seed point already has fill color pixel[x, y] = value - except IndexError: + except (ValueError, IndexError): return # seed point outside image edge = [(x, y)] if border is None: