summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-12 22:52:37 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-12 22:52:37 +0000
commitb72cfa5dcc488f3b497fa05a88985cc8f790cc00 (patch)
treef18382c910dcae96b5e60091025826443c52381d
parentf767543fe71db6fb840ad8f328158fe0c6d65ad4 (diff)
downloadfreeipa.git-b72cfa5dcc488f3b497fa05a88985cc8f790cc00.tar.gz
freeipa.git-b72cfa5dcc488f3b497fa05a88985cc8f790cc00.tar.xz
freeipa.git-b72cfa5dcc488f3b497fa05a88985cc8f790cc00.zip
121: Renamed API.__call__() method to API.finalize()
-rw-r--r--ipalib/plugable.py2
-rw-r--r--ipalib/startup.py2
-rw-r--r--ipalib/tests/test_plugable.py2
-rw-r--r--ipalib/tests/test_public.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 230e8ee2..8241d8ea 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -485,7 +485,7 @@ class API(ReadOnly):
self.register = Registrar(*allowed)
self.__lock__()
- def __call__(self):
+ def finalize(self):
"""
Finalize the registration, instantiate the plugins.
"""
diff --git a/ipalib/startup.py b/ipalib/startup.py
index edc14405..cfeb57b1 100644
--- a/ipalib/startup.py
+++ b/ipalib/startup.py
@@ -28,4 +28,4 @@ unnecessary side effects (needed for unit tests, among other things).
from run import api
import plugins
-api()
+api.finalize()
diff --git a/ipalib/tests/test_plugable.py b/ipalib/tests/test_plugable.py
index 8ce98610..3b082082 100644
--- a/ipalib/tests/test_plugable.py
+++ b/ipalib/tests/test_plugable.py
@@ -601,7 +601,7 @@ def test_API():
r(base1_plugin2)
# Test API instance:
- api() # Calling instance performs finalization
+ api.finalize()
def get_base(b):
return 'base%d' % b
diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py
index 4a445140..eb19f28a 100644
--- a/ipalib/tests/test_public.py
+++ b/ipalib/tests/test_public.py
@@ -374,4 +374,4 @@ def test_PublicAPI():
pass
api.register(cmd2)
- api()
+ api.finalize()