From dae9c6cbc164c8d1d5da22013193f2b1778e4d17 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Thu, 3 Sep 2015 14:03:09 +0200 Subject: [PATCH] realmdomains: Do not fail due the ValidationError when adding _kerberos TXT record https://fedorahosted.org/freeipa/ticket/5278 Reviewed-By: Martin Basti --- ipalib/plugins/realmdomains.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ipalib/plugins/realmdomains.py b/ipalib/plugins/realmdomains.py index db9c5ccc2..78fdfc937 100644 --- a/ipalib/plugins/realmdomains.py +++ b/ipalib/plugins/realmdomains.py @@ -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(