mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Image.__eq__: Add isinstance check.
This commit is contained in:
parent
58df924da6
commit
9ec023503d
|
@ -605,7 +605,8 @@ class Image(object):
|
|||
return filename
|
||||
|
||||
def __eq__(self, other):
|
||||
return (self.__class__.__name__ == other.__class__.__name__ and
|
||||
return (isinstance(other, Image) and
|
||||
self.__class__.__name__ == other.__class__.__name__ and
|
||||
self.mode == other.mode and
|
||||
self.size == other.size and
|
||||
self.info == other.info and
|
||||
|
|
Loading…
Reference in New Issue
Block a user