Merge pull request #1890 from radarhere/not_implemented

Replaced Exception with NotImplementedError
This commit is contained in:
wiredfool 2016-05-06 17:16:00 +01:00
commit 783fbaeb02
2 changed files with 8 additions and 8 deletions

View File

@ -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. " +

View File

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