From c02fcf5d34ad880e082cbc0c7f59fc3812d11c9e Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 2 May 2012 12:36:15 -0400 Subject: Don't fail when adding default objectclasses using config-mod The config plugin was adding together a list and a tuple, then converting to a set. Replace the operation with a set union. Regression test included. https://fedorahosted.org/freeipa/ticket/2706 --- ipalib/plugins/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipalib/plugins/config.py') diff --git a/ipalib/plugins/config.py b/ipalib/plugins/config.py index df960f4c..30f26add 100644 --- a/ipalib/plugins/config.py +++ b/ipalib/plugins/config.py @@ -229,8 +229,8 @@ class config_mod(LDAPUpdate): if not entry_attrs[attr]: raise errors.ValidationError(name=attr, error=_('May not be empty')) - objectclasses = list(set(entry_attrs[attr] \ - + self.api.Object[obj].possible_objectclasses)) + objectclasses = list(set(entry_attrs[attr]).union( + self.api.Object[obj].possible_objectclasses)) new_allowed_attrs = ldap.get_allowed_attributes(objectclasses, raise_on_unknown=True) checked_attrs = self.api.Object[obj].default_attributes -- cgit