From 348fcbcbaf5c686cdb077c9bed53ded95ad04b49 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 8 Apr 2015 16:13:55 -0400 Subject: The last allowed/mapping rule can be removed in SPs If you created rule(s) in an SP for either allowed attributes or attribute mapping there was no way to remove the last rule meaning it could never go back to use the global defaults. https://fedorahosted.org/ipsilon/ticket/25 Signed-off-by: Rob Crittenden Reviewed-by: Simo Sorce --- ipsilon/util/config.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipsilon/util/config.py') diff --git a/ipsilon/util/config.py b/ipsilon/util/config.py index 523601d..5366a96 100644 --- a/ipsilon/util/config.py +++ b/ipsilon/util/config.py @@ -178,6 +178,8 @@ class List(Option): class ComplexList(List): def _check_value(self, value): + if value is None: + return if type(value) is not list: raise ValueError('The value type must be a list, not "%s"' % type(value)) @@ -202,6 +204,8 @@ class ComplexList(List): class MappingList(ComplexList): def _check_value(self, value): + if value is None: + return if type(value) is not list: raise ValueError('The value type must be a list, not "%s"' % type(value)) -- cgit