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

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Smith <mrdoctorwho@gmail.com>2016-12-26 00:10:31 +0300
committerJohn Smith <mrdoctorwho@gmail.com>2016-12-26 00:10:31 +0300
commitfc821e00b80196cb6098ea0fa213a0a86c625410 (patch)
tree46f821c726c2c2c37805ec92a77d9c43431c4942
parentccf1513c690ed3d36baf4eafc201909867a202f2 (diff)
Fix RuntimeError in longpoll
-rw-r--r--library/longpoll.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/longpoll.py b/library/longpoll.py
index 2be0bca..116aeae 100644
--- a/library/longpoll.py
+++ b/library/longpoll.py
@@ -293,7 +293,7 @@ class Poll(object):
cls.processResult(user, opener)
with cls.__lock:
- for sock, (user, opener) in cls.__list.iteritems():
+ for sock, (user, opener) in cls.__list.items():
if hasattr(user, "vk") and not user.vk.online:
logger.debug("longpoll: user is not online, so removing them from poll"
" (jid: %s)", user.source)
@@ -326,9 +326,9 @@ class Poll(object):
@utils.threaded
def checkIfSocketsAlive(cls):
while cls.__list:
- for sock, (user, opener) in cls.__list.iteritems():
+ for sock, (user, opener) in cls.__list.items():
if (time.time() - opener.created) > OPENER_LIFETIME:
with cls.__lock:
del cls.__list[sock]
cls.processPollResult(user, opener)
- time.sleep(SOCKET_CHECK_TIMEOUT) \ No newline at end of file
+ time.sleep(SOCKET_CHECK_TIMEOUT)