diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-02 15:15:03 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-02 15:15:03 +0000 |
commit | 5af91df9a58c5066cbd526561886023d5edbfc0f (patch) | |
tree | 8553dd9e78878f43e8d09094187ba341bba23d8a /ipalib/errors.py | |
parent | 2fa8d3be74ca45ee5989dd53b7fb818b21d23680 (diff) | |
download | freeipa-5af91df9a58c5066cbd526561886023d5edbfc0f.tar.gz freeipa-5af91df9a58c5066cbd526561886023d5edbfc0f.tar.xz freeipa-5af91df9a58c5066cbd526561886023d5edbfc0f.zip |
226: check_type() and check_isinstance() now return the value; updated corresponding unit tests
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r-- | ipalib/errors.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index 1c109ed6..8c1df455 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -71,6 +71,7 @@ def check_type(name, type_, value, allow_None=False): return if type(value) is not type_: raise_TypeError(name, type_, value) + return value def check_isinstance(name, type_, value, allow_None=False): @@ -81,6 +82,7 @@ def check_isinstance(name, type_, value, allow_None=False): return if not isinstance(value, type_): raise_TypeError(name, type_, value) + return value class IPAError(Exception): |