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.") ##