diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2019-10-14 15:03:09 +0200 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2019-10-14 15:03:09 +0200 |
commit | b2cf7c0ce83640834bba06e3e467f1ddd9c75525 (patch) | |
tree | c170d8a6813d8d055d8c2f92bdc87126610cb8f0 | |
parent | 2ff5fdf34778d9fab0e08c7388acd2c06a040734 (diff) | |
download | poezio-b2cf7c0ce83640834bba06e3e467f1ddd9c75525.tar.gz poezio-b2cf7c0ce83640834bba06e3e467f1ddd9c75525.tar.bz2 poezio-b2cf7c0ce83640834bba06e3e467f1ddd9c75525.tar.xz poezio-b2cf7c0ce83640834bba06e3e467f1ddd9c75525.zip |
plugins/ping: Remove safeJID call
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r-- | plugins/ping.py | 6 |
1 files 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): |