summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-06-22 10:58:43 +0000
committerJan Cholasta <jcholast@redhat.com>2015-07-01 13:05:30 +0000
commite39fe4ed31042bd28357d093fdbd93b4d6d59aaa (patch)
treec9edd3b3d710ae642d91eb8ca0c060cb5f6d0f0c /ipalib/frontend.py
parent2d1515323acb4125306817096bafab6623de0b47 (diff)
downloadfreeipa-e39fe4ed31042bd28357d093fdbd93b4d6d59aaa.tar.gz
freeipa-e39fe4ed31042bd28357d093fdbd93b4d6d59aaa.tar.xz
freeipa-e39fe4ed31042bd28357d093fdbd93b4d6d59aaa.zip
plugable: Pass API to plugins on initialization rather than using set_api
https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r--ipalib/frontend.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 0b42cb63e..c36bfca46 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -1250,12 +1250,12 @@ class Attribute(Plugin):
# Create stubs for attributes that are set in _on_finalize()
__obj = Plugin.finalize_attr('_Attribute__obj')
- def __init__(self):
+ def __init__(self, api):
m = self.NAME_REGEX.match(type(self).__name__)
assert m
self.__obj_name = m.group('obj')
self.__attr_name = m.group('attr')
- super(Attribute, self).__init__()
+ super(Attribute, self).__init__(api)
def __get_obj_name(self):
return self.__obj_name
@@ -1347,9 +1347,6 @@ class Method(Attribute, Command):
extra_options_first = False
extra_args_first = False
- def __init__(self):
- super(Method, self).__init__()
-
def get_output_params(self):
for param in self.obj.params():
if 'no_output' in param.flags: