From 31d3e3b2b640e210e577eaa01c292c92be84d953 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Fri, 17 Feb 2012 12:24:44 -0500 Subject: Updated XEP-0009 to handle unicode strings --- sleekxmpp/plugins/xep_0009/binding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sleekxmpp/plugins/xep_0009') diff --git a/sleekxmpp/plugins/xep_0009/binding.py b/sleekxmpp/plugins/xep_0009/binding.py index b4395707..892fa67a 100644 --- a/sleekxmpp/plugins/xep_0009/binding.py +++ b/sleekxmpp/plugins/xep_0009/binding.py @@ -54,7 +54,7 @@ def _py2xml(*args): boolean = ET.Element("{%s}boolean" % _namespace) boolean.text = str(int(x)) val.append(boolean) - elif type(x) is str: + elif type(x) in (str, unicode): string = ET.Element("{%s}string" % _namespace) string.text = x val.append(string) -- cgit v1.2.3