summaryrefslogtreecommitdiffstats
path: root/ipsilon/util/config.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2015-04-08 16:13:55 -0400
committerSimo Sorce <simo@redhat.com>2015-04-10 10:41:09 -0400
commit348fcbcbaf5c686cdb077c9bed53ded95ad04b49 (patch)
treefa0e8b0890bb7a73ae62905e2b8fe614157a4e77 /ipsilon/util/config.py
parent130aaa056aac3d214afef4a43ddf6f948f5f0a8b (diff)
downloadipsilon.git-348fcbcbaf5c686cdb077c9bed53ded95ad04b49.tar.gz
ipsilon.git-348fcbcbaf5c686cdb077c9bed53ded95ad04b49.tar.xz
ipsilon.git-348fcbcbaf5c686cdb077c9bed53ded95ad04b49.zip
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 <rcritten@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/util/config.py')
-rw-r--r--ipsilon/util/config.py4
1 files changed, 4 insertions, 0 deletions
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))