forked from sch/Blasta
2103b061a2
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.
19 lines
489 B
Python
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))
|