summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-05-07 10:08:46 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-05-07 10:08:46 +0100
commit4e8800f9548363234f291998b365d45f32384183 (patch)
tree362eec51041f02416f0800643ddc8ee92951a61c
parent40053518aa59786b16c26a90094284c9d068126f (diff)
downloadslixmpp-4e8800f9548363234f291998b365d45f32384183.tar.gz
slixmpp-4e8800f9548363234f291998b365d45f32384183.tar.bz2
slixmpp-4e8800f9548363234f291998b365d45f32384183.tar.xz
slixmpp-4e8800f9548363234f291998b365d45f32384183.zip
jid: return not equal if value can't be converted to JID
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--slixmpp/jid.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/slixmpp/jid.py b/slixmpp/jid.py
index cb9512b8..caa9c174 100644
--- a/slixmpp/jid.py
+++ b/slixmpp/jid.py
@@ -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