realmdomains: Do not fail due the ValidationError when adding _kerberos TXT record

https://fedorahosted.org/freeipa/ticket/5278

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Tomas Babej
2015-10-12 13:34:20 +02:00
committed by Martin Basti
parent 1e1d6d15c6
commit dae9c6cbc1
+5 -2
View File
@@ -289,7 +289,9 @@ class realmdomains_mod(LDAPUpdate):
u'_kerberos',
txtrecord=api.env.realm
)
except (errors.EmptyModlist, errors.NotFound) as error:
except (errors.EmptyModlist, errors.NotFound,
errors.ValidationError) as error:
# If creation of the _kerberos TXT record failed, prompt
# for manual intervention
messages.add_message(
@@ -316,7 +318,8 @@ class realmdomains_mod(LDAPUpdate):
u'_kerberos',
txtrecord=api.env.realm
)
except (errors.AttrValueNotFound, errors.NotFound) as error:
except (errors.AttrValueNotFound, errors.NotFound,
errors.ValidationError) as error:
# If deletion of the _kerberos TXT record failed, prompt
# for manual intervention
messages.add_message(