Philipp Hörist pushed to branch master at gajim / gajim
Commits:
3f5191ab by lovetox at 2022-05-28T07:43:47+02:00
fix: Don’t redefine class
- - - - -
cad2fd95 by lovetox at 2022-05-28T07:51:42+02:00
chore: Iq: Fix pylint errors
- - - - -
2bdb296a by lovetox at 2022-05-28T07:53:18+02:00
fix: Iq: Remove condition for not existing attribute
- - - - -
1 changed file:
- gajim/common/modules/iq.py
Changes:
=====================================
gajim/common/modules/iq.py
=====================================
@@ -17,7 +17,6 @@
from __future__ import annotations
import nbxmpp
-from nbxmpp.protocol import Iq
from nbxmpp.structs import IqProperties
from nbxmpp.structs import StanzaHandler
@@ -43,10 +42,11 @@ def __init__(self, con: types.Client) -> None:
def _iq_error_received(self,
_con: types.xmppClient,
- _stanza: Iq,
+ _stanza: nbxmpp.protocol.Iq,
properties: IqProperties
) -> None:
self._log.info('Error: %s', properties.error)
+ assert properties.error is not None
if properties.error.condition in ('jid-malformed',
'forbidden',
'not-acceptable'):
@@ -68,18 +68,17 @@ def _iq_error_received(self,
raise nbxmpp.NodeProcessed
if properties.error.condition == 'item-not-found':
- if not properties.is_pubsub:
- sid = self._get_sid(properties.id)
- file_props = FilesProp.getFileProp(self._account, sid)
- if file_props:
- app.ged.raise_event(
- FileSendError(account=self._account,
- jid=str(properties.jid),
- file_props=file_props,
- error_msg=''))
- self._con.get_module('Bytestream').disconnect_transfer(
- file_props)
- raise nbxmpp.NodeProcessed
+ sid = self._get_sid(properties.id)
+ file_props = FilesProp.getFileProp(self._account, sid)
+ if file_props:
+ app.ged.raise_event(
+ FileSendError(account=self._account,
+ jid=str(properties.jid),
+ file_props=file_props,
+ error_msg=''))
+ self._con.get_module('Bytestream').disconnect_transfer(
+ file_props)
+ raise nbxmpp.NodeProcessed
self._log.error('Received iq error with unknown id: %s',
properties.error)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/16dc125b389a2929a1ead85b8cc723084c1ccc5d...2bdb296a66147ed4e52be52d77d434e12c57a6db
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/16dc125b389a2929a1ead85b8cc723084c1ccc5d...2bdb296a66147ed4e52be52d77d434e12c57a6db
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits