From b72cfa5dcc488f3b497fa05a88985cc8f790cc00 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Tue, 12 Aug 2008 22:52:37 +0000 Subject: [PATCH] 121: Renamed API.__call__() method to API.finalize() --- ipalib/plugable.py | 2 +- ipalib/startup.py | 2 +- ipalib/tests/test_plugable.py | 2 +- ipalib/tests/test_public.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 230e8ee26..8241d8eaa 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 edc144054..cfeb57b16 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 8ce986102..3b082082f 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 4a4451406..eb19f28aa 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()