From 6dd4456b11046e71bd73b18ab227763ab218514c Mon Sep 17 00:00:00 2001 From: Anton Ryzhov Date: Mon, 18 Feb 2013 23:41:13 +0400 Subject: [PATCH] Fixed resource generation via uuid --- sleekxmpp/plugins/xep_0078/legacyauth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sleekxmpp/plugins/xep_0078/legacyauth.py b/sleekxmpp/plugins/xep_0078/legacyauth.py index 7e2d7bdf..da6bfa2c 100644 --- a/sleekxmpp/plugins/xep_0078/legacyauth.py +++ b/sleekxmpp/plugins/xep_0078/legacyauth.py @@ -6,6 +6,7 @@ See the file LICENSE for copying permission. """ +import uuid import logging import hashlib import random @@ -98,7 +99,7 @@ class XEP_0078(BasePlugin): # A resource is required, so create a random one if necessary resource = self.xmpp.requested_jid.resource if not resource: - resource = uuid.uuid4() + resource = str(uuid.uuid4()) iq['auth']['resource'] = resource