From e39fe4ed31042bd28357d093fdbd93b4d6d59aaa Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 22 Jun 2015 10:58:43 +0000 Subject: plugable: Pass API to plugins on initialization rather than using set_api https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky --- ipalib/frontend.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ipalib/frontend.py') 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: -- cgit