summaryrefslogtreecommitdiff
path: root/sleekxmpp/clientxmpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r--sleekxmpp/clientxmpp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 1aab4a78..1816649a 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -162,7 +162,8 @@ class ClientXMPP(BaseXMPP):
intmax += answer.priority
addresses[intmax] = (answer.target.to_text()[:-1],
answer.port)
- priorities = addresses.keys()
+ #python3 returns a generator for dictionary keys
+ priorities = [x for x in addresses.keys()]
priorities.sort()
picked = random.randint(0, intmax)