Replaced Exception with NotImplementedError

This commit is contained in:
Andrew Murray 2016-05-06 20:11:03 +10:00
parent 44c74c575d
commit be028a0c3f
2 changed files with 8 additions and 8 deletions

View File

@ -87,11 +87,11 @@ class ImageDraw(object):
self.font = None
def setink(self, ink):
raise Exception("setink() has been removed. " +
raise NotImplementedError("setink() has been removed. " +
"Please use keyword arguments instead.")
def setfill(self, onoff):
raise Exception("setfill() has been removed. " +
raise NotImplementedError("setfill() has been removed. " +
"Please use keyword arguments instead.")
def setfont(self, font):

View File

@ -183,11 +183,11 @@ class Dib(object):
return self.image.tobytes()
def fromstring(self, *args, **kw):
raise Exception("fromstring() has been removed. " +
raise NotImplementedError("fromstring() has been removed. " +
"Please use frombytes() instead.")
def tostring(self, *args, **kw):
raise Exception("tostring() has been removed. " +
raise NotImplementedError("tostring() has been removed. " +
"Please use tobytes() instead.")