From c6443af29a9c8ef0ca47232015159c28cb05fb97 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 27 Dec 2017 15:48:42 +0100 Subject: [PATCH] stringprep: Make pure-Python punycode() return bytes. Fixes #3366. --- slixmpp/stringprep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slixmpp/stringprep.py b/slixmpp/stringprep.py index 99506d78..672c63b7 100644 --- a/slixmpp/stringprep.py +++ b/slixmpp/stringprep.py @@ -114,7 +114,7 @@ def punycode(domain): if char in ILLEGAL_CHARS: raise StringprepError - domain_parts.append(label) + domain_parts.append(label.encode('ascii')) return b'.'.join(domain_parts) logging.getLogger(__name__).warning('Using slower stringprep, consider '