Fix internal error when renaming user with an empty string.

ticket 2629
This commit is contained in:
Jan Cholasta 2012-04-12 07:29:21 -04:00 committed by Martin Kosek
parent 88927fb78b
commit c043a65728

View File

@ -551,7 +551,7 @@ class user_mod(LDAPUpdate):
has_output_params = LDAPUpdate.has_output_params + user_output_params
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
if 'rename' in options:
if options.get('rename') is not None:
config = ldap.get_ipa_config()[1]
if 'ipamaxusernamelength' in config:
if len(options['rename']) > int(config.get('ipamaxusernamelength')[0]):