diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-02 17:44:07 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-02 17:44:07 +0000 |
commit | bc08225dcd719eba0134e8a59ea7932fdea8513d (patch) | |
tree | 8f613d5ab51e475da44a87719a1d26f0cee89f7a /ipalib/errors.py | |
parent | f2da06c5cf33a766bf6051acfa772f2dbd4237d8 (diff) | |
download | freeipa-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.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index 1b556c33..d68bac40 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) |