Fix empty external member processing

Validation of external member was failing for empty strings because of
wrong condition.

https://fedorahosted.org/freeipa/ticket/2447
This commit is contained in:
Ondrej Hamada 2012-04-03 15:16:58 +02:00 committed by Martin Kosek
parent c79ea41a80
commit 6f7224f252

View File

@ -326,7 +326,7 @@ def add_external_pre_callback(membertype, ldap, dn, keys, options):
def validate_host(hostname):
validate_hostname(hostname, check_fqdn=False, allow_underscore=True)
if membertype in options:
if options.get(membertype):
if membertype == 'host':
validator = validate_host
else: