Call other.__eq__ in irclib.Irc.__eq__ instead of using the == comparator.

Here, this operator is not reflexive, and Python 3 calls the second members resulting in a stack overflow.
This commit is contained in:
Valentin Lorentz 2012-08-04 13:25:47 +02:00
parent 1cb657ddb2
commit e23fa611d6

View File

@ -1073,7 +1073,7 @@ class Irc(IrcCommandDispatcher):
if isinstance(other, self.__class__): if isinstance(other, self.__class__):
return id(self) == id(other) return id(self) == id(other)
else: else:
return other == self return other.__eq__(self)
def __ne__(self, other): def __ne__(self, other):
return not (self == other) return not (self == other)