diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-14 21:40:37 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-14 21:40:37 +0000 |
commit | 5f38daf6dee93c7b80b79b6c915ce6916c79fcdc (patch) | |
tree | 8b92b00cb0f492c279cdbd41679e17860c223c33 | |
parent | a7b3dde055d8459720397ae891003228a1a181eb (diff) | |
download | freeipa-5f38daf6dee93c7b80b79b6c915ce6916c79fcdc.tar.gz freeipa-5f38daf6dee93c7b80b79b6c915ce6916c79fcdc.tar.xz freeipa-5f38daf6dee93c7b80b79b6c915ce6916c79fcdc.zip |
167: In API.finalize(), lock(plugin) is used instead of plugin.__lock__(); more docstring improvements in plugable.py
-rw-r--r-- | ipalib/plugable.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 5bfe5977a..e82167ab0 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -357,8 +357,10 @@ class Proxy(ReadOnly): def check_name(name): """ - Raises `errors.NameSpaceError` if ``name`` is not a valid Python identifier - suitable for use in a `NameSpace`. + Verifies that ``name`` is suitable for a `NameSpace` member name. + + Raises `errors.NameSpaceError` if ``name`` is not a valid Python + identifier suitable for use as the name of `NameSpace` member. :param name: Identifier to test. """ @@ -666,6 +668,9 @@ class Registrar(ReadOnly): class API(ReadOnly): + """ + Dynamic API object through which `Plugin` instances are accessed. + """ __finalized = False def __init__(self, *allowed): @@ -692,8 +697,7 @@ class API(ReadOnly): object.__setattr__(self, base.__name__, ns) for plugin in d.values(): plugin.finalize(self) - plugin.__lock__() - assert plugin.__islocked__() is True + lock(plugin) assert plugin.api is self object.__setattr__(self, '_API__finalized', True) |