mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Changed the use of the generic "Exception" to "NotImplementedError" in the deprecated functions.
This commit is contained in:
parent
72766b8f4e
commit
1f4e2a180b
|
@ -695,7 +695,7 @@ class Image(object):
|
|||
return b"".join(data)
|
||||
|
||||
def tostring(self, *args, **kw):
|
||||
raise Exception("tostring() has been removed. " +
|
||||
raise NotImplementedError("tostring() has been removed. " +
|
||||
"Please call tobytes() instead.")
|
||||
|
||||
def tobitmap(self, name="image"):
|
||||
|
@ -746,7 +746,7 @@ class Image(object):
|
|||
raise ValueError("cannot decode image data")
|
||||
|
||||
def fromstring(self, *args, **kw):
|
||||
raise Exception("fromstring() has been removed. " +
|
||||
raise NotImplementedError("fromstring() has been removed. " +
|
||||
"Please call frombytes() instead.")
|
||||
|
||||
def load(self):
|
||||
|
@ -1254,7 +1254,7 @@ class Image(object):
|
|||
return self.im.histogram()
|
||||
|
||||
def offset(self, xoffset, yoffset=None):
|
||||
raise Exception("offset() has been removed. " +
|
||||
raise NotImplementedError("offset() has been removed. " +
|
||||
"Please call ImageChops.offset() instead.")
|
||||
|
||||
def paste(self, im, box=None, mask=None):
|
||||
|
@ -2073,7 +2073,7 @@ def frombytes(mode, size, data, decoder_name="raw", *args):
|
|||
|
||||
|
||||
def fromstring(*args, **kw):
|
||||
raise Exception("fromstring() has been removed. " +
|
||||
raise NotImplementedError("fromstring() has been removed. " +
|
||||
"Please call frombytes() instead.")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user