From be028a0c3fa641b90a2d0e48cb3e53e2901e6230 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 6 May 2016 20:11:03 +1000 Subject: [PATCH] Replaced Exception with NotImplementedError --- PIL/ImageDraw.py | 8 ++++---- PIL/ImageWin.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PIL/ImageDraw.py b/PIL/ImageDraw.py index 1d5f53746..248c68b2a 100644 --- a/PIL/ImageDraw.py +++ b/PIL/ImageDraw.py @@ -87,12 +87,12 @@ class ImageDraw(object): self.font = None def setink(self, ink): - raise Exception("setink() has been removed. " + - "Please use keyword arguments instead.") + raise NotImplementedError("setink() has been removed. " + + "Please use keyword arguments instead.") def setfill(self, onoff): - raise Exception("setfill() has been removed. " + - "Please use keyword arguments instead.") + raise NotImplementedError("setfill() has been removed. " + + "Please use keyword arguments instead.") def setfont(self, font): warnings.warn("setfont() is deprecated. " + diff --git a/PIL/ImageWin.py b/PIL/ImageWin.py index 58894d604..3b5bac171 100644 --- a/PIL/ImageWin.py +++ b/PIL/ImageWin.py @@ -183,12 +183,12 @@ class Dib(object): return self.image.tobytes() def fromstring(self, *args, **kw): - raise Exception("fromstring() has been removed. " + - "Please use frombytes() instead.") + raise NotImplementedError("fromstring() has been removed. " + + "Please use frombytes() instead.") def tostring(self, *args, **kw): - raise Exception("tostring() has been removed. " + - "Please use tobytes() instead.") + raise NotImplementedError("tostring() has been removed. " + + "Please use tobytes() instead.") ##