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

--
Martin^3 Babinsky
From b4268f342f27a15156f6bb83c8fb971998c9221c Mon Sep 17 00:00:00 2001
From: Martin Babinsky <mbabi...@redhat.com>
Date: Wed, 22 Jun 2016 15:08:43 +0200
Subject: [PATCH] server-del: handle missing server attributes when checking
 for last of role

https://fedorahosted.org/freeipa/ticket/5960
---
 ipaserver/plugins/server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/plugins/server.py b/ipaserver/plugins/server.py
index 42bcb393f21ca802c2a98a3674f9649e6ede446f..78e5f35f27dd07d641caf87298f90aa13a059408 100644
--- a/ipaserver/plugins/server.py
+++ b/ipaserver/plugins/server.py
@@ -478,9 +478,9 @@ class server_del(LDAPDelete):
             return
 
         ca_servers = ipa_config['ca_server_server']
-        ca_renewal_master = ipa_config['ca_renewal_master_server']
+        ca_renewal_master = ipa_config.get('ca_renewal_master_server', None)
         dns_servers = dns_config['dns_server_server']
-        dnssec_keymaster = dns_config['dnssec_key_master_server']
+        dnssec_keymaster = dns_config.get('dnssec_key_master_server', None)
 
         if ca_servers == [hostname]:
             raise errors.ServerRemovalError(
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to