Image.__eq__: Add isinstance check.

This commit is contained in:
neiljp (Neil Pilgrim) 2017-08-22 14:39:00 -07:00
parent 58df924da6
commit 9ec023503d

View File

@ -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