mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user