2024-03-12 18:13:01 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2024-06-13 17:53:53 +02:00
|
|
|
from slixfeed.log import Logger
|
2024-03-24 09:14:20 +01:00
|
|
|
from slixmpp.exceptions import IqError, IqTimeout
|
2024-03-12 18:13:01 +01:00
|
|
|
|
2024-06-13 17:53:53 +02:00
|
|
|
logger = Logger(__name__)
|
|
|
|
|
2024-03-12 18:13:01 +01:00
|
|
|
class XmppIQ:
|
|
|
|
|
|
|
|
async def send(self, iq):
|
|
|
|
try:
|
2024-05-14 21:39:58 +02:00
|
|
|
await iq.send(timeout=15)
|
|
|
|
except IqTimeout as e:
|
2024-06-13 17:53:53 +02:00
|
|
|
logger.error('Error Timeout')
|
|
|
|
logger.error(str(e))
|
2024-05-14 21:39:58 +02:00
|
|
|
except IqError as e:
|
2024-06-13 17:53:53 +02:00
|
|
|
logger.error('Error XmppIQ')
|
|
|
|
logger.error(str(e))
|