From ed7a3e005a052845b7302744c0f6c16f7cdfd511 Mon Sep 17 00:00:00 2001 From: Jr Aquino Date: Thu, 16 Jun 2011 12:18:16 -0700 Subject: Don't add empty tuple to entry_attrs['externalhost'] https://fedorahosted.org/freeipa/ticket/1339 --- ipalib/plugins/sudorule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipalib/plugins/sudorule.py') diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py index a7fd82775..7b70356e1 100644 --- a/ipalib/plugins/sudorule.py +++ b/ipalib/plugins/sudorule.py @@ -448,7 +448,8 @@ class sudorule_remove_host(LDAPRemoveMember): except errors.EmptyModlist: pass failed['memberhost']['host'] = failed_hosts - entry_attrs['externalhost'] = external_hosts + if external_hosts: + entry_attrs['externalhost'] = external_hosts return (completed + completed_external, dn) api.register(sudorule_remove_host) -- cgit