summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2021-12-22 00:06:07 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2021-12-22 00:29:26 +0100
commit01b9f37dac2f5f1e976704e30c0c1f6e30755146 (patch)
treeaca745c7010602aa6391c77737bfba7a618f7275 /plugins
parent4f6bc9073ea24b911de038cbf94395789bf63fa9 (diff)
downloadpoezio-01b9f37dac2f5f1e976704e30c0c1f6e30755146.tar.gz
poezio-01b9f37dac2f5f1e976704e30c0c1f6e30755146.tar.bz2
poezio-01b9f37dac2f5f1e976704e30c0c1f6e30755146.tar.xz
poezio-01b9f37dac2f5f1e976704e30c0c1f6e30755146.zip
/disco plugin: Add error handling
It was missing.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/disco.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/disco.py b/plugins/disco.py
index 52963d39..eea3a411 100644
--- a/plugins/disco.py
+++ b/plugins/disco.py
@@ -18,6 +18,7 @@ Usage
from poezio.plugin import BasePlugin
from poezio.decorators import command_args_parser
from slixmpp.jid import InvalidJID
+from slixmpp.exceptions import IqError, IqTimeout
class Plugin(BasePlugin):
@@ -99,3 +100,7 @@ class Plugin(BasePlugin):
self.on_items(iq)
except InvalidJID as e:
self.api.information('Invalid JID “%s”: %s' % (jid, e), 'Error')
+ except IqError as e:
+ self.api.information('Received iq error while querying “%s”: %s' % (jid, e), 'Error')
+ except IqTimeout:
+ self.api.information('Received no reply querying “%s”…' % jid, 'Error')