Slixfeed/slixfeed/xmpp/iq.py
Schimon Jehudah, Adv. 263382ba8d Add Gajim to the list of recommended clients;
Improve PEP and PubSub publishing mechanism.
2024-09-25 11:56:46 +03:00

22 lines
540 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from slixfeed.log import Logger
from slixmpp.exceptions import IqError, IqTimeout
logger = Logger(__name__)
class XmppIQ:
async def send(self, iq):
try:
result = await iq.send(timeout=15)
except IqTimeout as e:
logger.error('Error Timeout')
logger.error(str(e))
result = e
except IqError as e:
logger.error('Error XmppIQ')
logger.error(str(e))
result = e
return result