From 0b254e8b1e60b46ce29fecedbc088921a526fbd8 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 14 Sep 2012 12:05:12 -0400 Subject: Always handle NotFound error in dnsrecord-mod When there were no updated attrs when modifying a nonexistent DNS record, the error was not handled and caused an internal server error later (old_entry was used uninitialized). https://fedorahosted.org/freeipa/ticket/3055 --- ipalib/plugins/dns.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ipalib/plugins/dns.py') diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 5484119d..8c269c0a 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -2455,8 +2455,7 @@ class dnsrecord_mod(LDAPUpdate): (dn_, old_entry) = ldap.get_entry(dn, _record_attributes, normalize=self.obj.normalize_dn) except errors.NotFound: - if updated_attrs: - self.obj.handle_not_found(*keys) + self.obj.handle_not_found(*keys) if updated_attrs: for attr in updated_attrs: -- cgit