mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-22 13:14:45 +03:00
fix IFDRational equality
This commit is contained in:
parent
9b86da9c26
commit
c6c1d7c11a
|
@ -354,6 +354,9 @@ class IFDRational(Rational):
|
|||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, IFDRational):
|
||||
if self.denominator == 0 and other.denominator == 0:
|
||||
# in this case self._val and other._val would be NaN
|
||||
return self.numerator == other.numerator
|
||||
other = other._val
|
||||
return self._val == other
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user