summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-09-02 17:44:07 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-09-02 17:44:07 +0000
commitbc08225dcd719eba0134e8a59ea7932fdea8513d (patch)
tree8f613d5ab51e475da44a87719a1d26f0cee89f7a /ipalib/errors.py
parentf2da06c5cf33a766bf6051acfa772f2dbd4237d8 (diff)
downloadfreeipa-bc08225dcd719eba0134e8a59ea7932fdea8513d.tar.gz
freeipa-bc08225dcd719eba0134e8a59ea7932fdea8513d.tar.xz
freeipa-bc08225dcd719eba0134e8a59ea7932fdea8513d.zip
230: Renamed allow_None kwarg to allow_none
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 1b556c334..d68bac407 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -63,22 +63,22 @@ def raise_TypeError(value, type_, name):
raise e
-def check_type(value, type_, name, allow_None=False):
+def check_type(value, type_, name, allow_none=False):
assert type(name) is str, TYPE_FORMAT % ('name', str, name)
assert type(type_) is type, TYPE_FORMAT % ('type_', type, type_)
- assert type(allow_None) is bool, TYPE_FORMAT % ('allow_None', bool, allow_None)
- if value is None and allow_None:
+ assert type(allow_none) is bool, TYPE_FORMAT % ('allow_none', bool, allow_none)
+ if value is None and allow_none:
return
if type(value) is not type_:
raise_TypeError(value, type_, name)
return value
-def check_isinstance(value, type_, name, allow_None=False):
+def check_isinstance(value, type_, name, allow_none=False):
assert type(type_) is type, TYPE_FORMAT % ('type_', type, type_)
assert type(name) is str, TYPE_FORMAT % ('name', str, name)
- assert type(allow_None) is bool, TYPE_FORMAT % ('allow_None', bool, allow_None)
- if value is None and allow_None:
+ assert type(allow_none) is bool, TYPE_FORMAT % ('allow_none', bool, allow_none)
+ if value is None and allow_none:
return
if not isinstance(value, type_):
raise_TypeError(value, type_, name)