mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 10:56:18 +03:00
Replaced Exception with NotImplementedError
This commit is contained in:
parent
44c74c575d
commit
be028a0c3f
|
@ -87,12 +87,12 @@ class ImageDraw(object):
|
||||||
self.font = None
|
self.font = None
|
||||||
|
|
||||||
def setink(self, ink):
|
def setink(self, ink):
|
||||||
raise Exception("setink() has been removed. " +
|
raise NotImplementedError("setink() has been removed. " +
|
||||||
"Please use keyword arguments instead.")
|
"Please use keyword arguments instead.")
|
||||||
|
|
||||||
def setfill(self, onoff):
|
def setfill(self, onoff):
|
||||||
raise Exception("setfill() has been removed. " +
|
raise NotImplementedError("setfill() has been removed. " +
|
||||||
"Please use keyword arguments instead.")
|
"Please use keyword arguments instead.")
|
||||||
|
|
||||||
def setfont(self, font):
|
def setfont(self, font):
|
||||||
warnings.warn("setfont() is deprecated. " +
|
warnings.warn("setfont() is deprecated. " +
|
||||||
|
|
|
@ -183,12 +183,12 @@ class Dib(object):
|
||||||
return self.image.tobytes()
|
return self.image.tobytes()
|
||||||
|
|
||||||
def fromstring(self, *args, **kw):
|
def fromstring(self, *args, **kw):
|
||||||
raise Exception("fromstring() has been removed. " +
|
raise NotImplementedError("fromstring() has been removed. " +
|
||||||
"Please use frombytes() instead.")
|
"Please use frombytes() instead.")
|
||||||
|
|
||||||
def tostring(self, *args, **kw):
|
def tostring(self, *args, **kw):
|
||||||
raise Exception("tostring() has been removed. " +
|
raise NotImplementedError("tostring() has been removed. " +
|
||||||
"Please use tobytes() instead.")
|
"Please use tobytes() instead.")
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in New Issue
Block a user