summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-12-19 11:23:45 -0800
committerLance Stout <lancestout@gmail.com>2013-12-19 11:23:45 -0800
commitc183fd5e3513c49cd704a794d5269880f4c7abfd (patch)
tree4f49c21a2f7573dbd7577b313ef1337593f3cfeb /sleekxmpp/xmlstream/xmlstream.py
parent540d6e9dbb5c4be190f4d114a438f80a9d9cd623 (diff)
parent820d07f30965ef2d7979dd640a7028ba8e3915f7 (diff)
downloadslixmpp-c183fd5e3513c49cd704a794d5269880f4c7abfd.tar.gz
slixmpp-c183fd5e3513c49cd704a794d5269880f4c7abfd.tar.bz2
slixmpp-c183fd5e3513c49cd704a794d5269880f4c7abfd.tar.xz
slixmpp-c183fd5e3513c49cd704a794d5269880f4c7abfd.zip
Merge pull request #271 from louiz/develop
Use strings for ElementTree.iterparse events names
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index c503cdd2..b9f16f96 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -1498,8 +1498,8 @@ class XMLStream(object):
"""
depth = 0
root = None
- for event, xml in ET.iterparse(self.filesocket, (b'end', b'start')):
- if event == b'start':
+ for event, xml in ET.iterparse(self.filesocket, ('end', 'start')):
+ if event == 'start':
if depth == 0:
# We have received the start of the root element.
root = xml
@@ -1516,7 +1516,7 @@ class XMLStream(object):
# exponential backoff for new reconnect attempts.
self.reconnect_delay = 1.0
depth += 1
- if event == b'end':
+ if event == 'end':
depth -= 1
if depth == 0:
# The stream's root element has closed,