summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-01-03 18:42:57 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-01-03 18:42:57 +0100
commit1207c81ab50f5aa2865f60cbf005839a44be015b (patch)
treeb490cf91d0b94aff957341ab445aebd81bece9a9
parent565da65ccd322be5546ed40ff54484f8e3ef7464 (diff)
downloadslixmpp-1207c81ab50f5aa2865f60cbf005839a44be015b.tar.gz
slixmpp-1207c81ab50f5aa2865f60cbf005839a44be015b.tar.bz2
slixmpp-1207c81ab50f5aa2865f60cbf005839a44be015b.tar.xz
slixmpp-1207c81ab50f5aa2865f60cbf005839a44be015b.zip
Do not copy the stanza before calling each handlerexp_idle_call
-rw-r--r--slixmpp/xmlstream/xmlstream.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index f1abfca6..7417a7dc 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -901,15 +901,11 @@ class XMLStream(object):
handled = False
matched_handlers = [h for h in self.__handlers if h.match(stanza)]
for handler in matched_handlers:
- if len(matched_handlers) > 1:
- stanza_copy = copy.copy(stanza)
- else:
- stanza_copy = stanza
- handler.prerun(stanza_copy)
+ handler.prerun(stanza)
try:
- handler.run(stanza_copy)
+ handler.run(stanza)
except Exception as e:
- stanza_copy.exception(e)
+ stanza.exception(e)
if handler.check_delete():
self.__handlers.remove(handler)
handled = True