From 47968963b1819341563dbf39c782a69a00bf1644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 7 May 2019 11:56:39 +0100 Subject: [PATCH] Revert part of previous commit. Return NotImplemented when object is not a valid JID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- slixmpp/jid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slixmpp/jid.py b/slixmpp/jid.py index caa9c174..c6a8047c 100644 --- a/slixmpp/jid.py +++ b/slixmpp/jid.py @@ -425,8 +425,8 @@ class JID: if not isinstance(other, JID): try: other = JID(other) - except: - return False + except InvalidJid: + return NotImplemented return (self._node == other._node and self._domain == other._domain and