Make error message in migration plugin unicode.

This commit is contained in:
Pavel Zuna authored and Rob Crittenden committed 2010-02-17 12:47:36 -05:00
1 parent eb1577686b
commit 93a09b2dd1
1 file changed
+2 -2
+2 -2
View File
@@ -63,7 +63,7 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx):
entry_attrs.setdefault('gidnumber', ctx['def_group_gid'])
# generate a principal name and check if it isn't already taken
principal = '%s@%s' % (pkey, api.env.realm)
principal = u'%s@%s' % (pkey, api.env.realm)
try:
ldap.find_entry_by_attr(
'krbprincipalname', principal, 'krbprincipalaux', ['']
@@ -308,7 +308,7 @@ class migrate_ds(Command):
try:
ldap.add_entry(dn, entry_attrs)
except errors.ExecutionError, e:
failed[ldap_obj_name][pkey] = str(e)
failed[ldap_obj_name][pkey] = unicode(e)
else:
migrated[ldap_obj_name].append(pkey)