Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ehendrix23
slixmpp
Commits
1207c81a
Commit
1207c81a
authored
Jan 03, 2015
by
louiz’
Browse files
Do not copy the stanza before calling each handler
parent
565da65c
Changes
1
Hide whitespace changes
Inline
Side-by-side
slixmpp/xmlstream/xmlstream.py
View file @
1207c81a
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment