summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-09-14 12:05:12 -0400
committerMartin Kosek <mkosek@redhat.com>2012-09-24 13:55:30 +0200
commit909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555 (patch)
tree6e3606c7d3faaf690a8d3ac0a3993a552fadf3fb /ipalib
parent30da5d41652ac5adb1f76182ba170393573111e9 (diff)
downloadfreeipa.git-909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555.tar.gz
freeipa.git-909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555.tar.xz
freeipa.git-909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555.zip
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
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/dns.py3
1 files changed, 1 insertions, 2 deletions
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: