[ldap migration] use unicode strings
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 20 Feb 2012 16:13:36 +0100
changeset 8251 df46bf02b107
parent 8250 171a9d6bff8f
child 8253 df7d6c57a6c8
[ldap migration] use unicode strings
misc/migration/3.15.0_Any.py
--- a/misc/migration/3.15.0_Any.py	Tue Feb 14 11:33:59 2012 +0100
+++ b/misc/migration/3.15.0_Any.py	Mon Feb 20 16:13:36 2012 +0100
@@ -2,9 +2,9 @@
 
 for source in rql('CWSource X WHERE X type "ldapuser"').entities():
     config = source.dictconfig
-    host = config.pop('host', 'ldap')
-    protocol = config.pop('protocol', 'ldap')
-    source.set_attributes(url='%s://%s' % (protocol, host))
+    host = config.pop('host', u'ldap')
+    protocol = config.pop('protocol', u'ldap')
+    source.set_attributes(url=u'%s://%s' % (protocol, host))
     source.update_config(skip_unknown=True, **config)
 
 commit()