summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-23 15:53:45 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-03 15:29:03 -0500
commit0cfb0e191ad878d1b22e98ce484bf3048f7138c2 (patch)
treeba468c284cd37e89f649d6de31c58000bcca64dc /ipalib/plugable.py
parentf7375bb6090f32c3feb3d71e196ed01ee19fecc8 (diff)
downloadfreeipa-0cfb0e191ad878d1b22e98ce484bf3048f7138c2.tar.gz
freeipa-0cfb0e191ad878d1b22e98ce484bf3048f7138c2.tar.xz
freeipa-0cfb0e191ad878d1b22e98ce484bf3048f7138c2.zip
Removed the depreciated Context and LazyContext classes
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 1370d7f5..bc55c808 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -506,28 +506,6 @@ class Registrar(DictProxy):
self.__registered.add(klass)
-class LazyContext(object):
- """
- On-demand creation of thread-local context attributes.
- """
-
- def __init__(self, api):
- self.__api = api
- self.__context = threading.local()
-
- def __getattr__(self, name):
- if name not in self.__context.__dict__:
- if name not in self.__api.Context:
- raise AttributeError('no Context plugin for %r' % name)
- value = self.__api.Context[name].get_value()
- self.__context.__dict__[name] = value
- return self.__context.__dict__[name]
-
- def __getitem__(self, key):
- return self.__getattr__(key)
-
-
-
class API(DictProxy):
"""
Dynamic API object through which `Plugin` instances are accessed.
@@ -538,7 +516,6 @@ class API(DictProxy):
self.__done = set()
self.register = Registrar(*allowed)
self.env = Env()
- self.context = LazyContext(self)
super(API, self).__init__(self.__d)
def __doing(self, name):