diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-02 17:29:01 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-02 17:29:01 +0000 |
commit | 8b7fe7139dc47a421dd34376374a0ed06dc73f39 (patch) | |
tree | 7c012a6a97493b6d3c3d9246eaf38baa28e74280 /ipalib/plugable.py | |
parent | 6697b955eea6c5170cd68fef130d415ef3fa69cc (diff) | |
download | freeipa-8b7fe7139dc47a421dd34376374a0ed06dc73f39.tar.gz freeipa-8b7fe7139dc47a421dd34376374a0ed06dc73f39.tar.xz freeipa-8b7fe7139dc47a421dd34376374a0ed06dc73f39.zip |
228: plugable.check_name() now uses errors.check_type()
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r-- | ipalib/plugable.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 811a5527f..9880b0a08 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -28,6 +28,7 @@ http://docs.python.org/ref/sequence-types.html import re import inspect import errors +from errors import check_type, check_isinstance class ReadOnly(object): @@ -466,7 +467,7 @@ def check_name(name): :param name: Identifier to test. """ - assert type(name) is str, 'must be %r' % str + check_type(name, str, 'name') regex = r'^[a-z][_a-z0-9]*[a-z0-9]$' if re.match(regex, name) is None: raise errors.NameSpaceError(name, regex) |