jid: return not equal if value can't be converted to JID

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-05-07 10:08:46 +01:00
parent 40053518aa
commit 4e8800f954
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -423,7 +423,10 @@ class JID:
if isinstance(other, UnescapedJID):
return False
if not isinstance(other, JID):
other = JID(other)
try:
other = JID(other)
except:
return False
return (self._node == other._node and
self._domain == other._domain and