Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-07-05 23:35:23 +0300
committerlovetox <philipp@hoerist.com>2020-07-05 23:35:23 +0300
commitdb8cea4d9322963d27b74b81cfde92b7c1da665f (patch)
treeee0d7b3f6902cf14971e4f088a08f0133238cd3f /nbxmpp/smacks.py
parent496d79a39c81b272fc1c878c3d9db6d26692a564 (diff)
Smacks: Don't fail on saving error replies
Diffstat (limited to 'nbxmpp/smacks.py')
-rw-r--r--nbxmpp/smacks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nbxmpp/smacks.py b/nbxmpp/smacks.py
index d75cb19..eafa03a 100644
--- a/nbxmpp/smacks.py
+++ b/nbxmpp/smacks.py
@@ -23,6 +23,7 @@ from nbxmpp.simplexml import Node
from nbxmpp.const import StreamState
from nbxmpp.util import LogAdapter
from nbxmpp.structs import StanzaHandler
+from nbxmpp.protocol import Error
log = logging.getLogger('nbxmpp.smacks')
@@ -139,7 +140,9 @@ class Smacks:
# Make a full copy so we dont run into problems when
# the stanza is modified after sending for some reason
- stanza = type(stanza)(node=str(stanza))
+ # TODO: Make also copies of Protocol.Error objects
+ if not isinstance(stanza, Error):
+ stanza = type(stanza)(node=str(stanza))
self._add_delay(stanza)