From b2cf7c0ce83640834bba06e3e467f1ddd9c75525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 14 Oct 2019 15:03:09 +0200 Subject: plugins/ping: Remove safeJID call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/ping.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/ping.py b/plugins/ping.py index 7e0098aa..4a3ba8ef 100644 --- a/plugins/ping.py +++ b/plugins/ping.py @@ -26,7 +26,6 @@ from slixmpp import InvalidJID, JID from poezio.decorators import command_args_parser from poezio.plugin import BasePlugin from poezio.roster import roster -from poezio.common import safeJID from poezio.contact import Contact, Resource from poezio.core.structs import Completion from poezio import tabs @@ -73,7 +72,10 @@ class Plugin(BasePlugin): def command_ping(self, arg): if not arg: return self.core.command.help('ping') - jid = safeJID(arg) + try: + jid = JID(arg) + except InvalidJID: + return self.api.information('Invalid JID: %s' % arg, 'Error') start = time.time() def callback(iq): -- cgit v1.2.3