Blasta/blasta/xmpp/iq.py
Schimon Jehudah, Adv. 2103b061a2 Change node names;
Soft code (i.e. opposite of hard code) node names;
Improve parsing of Netscape HTML boomark files;
Add IQ module;
Catch more exceptions;
Display Jabber ID on template profile.
2025-01-08 00:43:25 +02:00

19 lines
489 B
Python

#!/usr/bin/python
# -*- coding: utf-8 -*-
from slixmpp.exceptions import IqError, IqTimeout
class XmppIq:
async def send(iq, timeout):
try:
await iq.send(timeout=timeout)
except IqError as e:
raise Exception('IQ Error!')
print(str(e))
except IqTimeout as e:
raise Exception('IQ Timeout!')
print(str(e))
except Exception as e:
raise Exception('Error!')
print(str(e))