From 9a21964877c4bb64599e75ca708ec83a72abeb51 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 20 Jun 2016 08:52:35 +0200 Subject: misc: generate `plugins` result directly in the command Move the code that generated result of the `plugins` command from API to the command itself. https://fedorahosted.org/freeipa/ticket/4427 Reviewed-By: David Kupka --- ipalib/plugable.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'ipalib') diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 8284cca39..5a5d02fb0 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -671,7 +671,6 @@ class API(ReadOnly): self.__do_if_not_done('load_plugins') production_mode = self.is_production_mode() - plugin_info = {} for base in self.bases: name = base.__name__ @@ -679,9 +678,6 @@ class API(ReadOnly): for klass in six.itervalues(self.__plugins): if not any(issubclass(b, base) for b in klass.bases): continue - plugin_info.setdefault( - '%s.%s' % (klass.__module__, klass.name), - []).append(name) if not self.env.plugins_on_demand: self._get(klass.name) @@ -698,7 +694,6 @@ class API(ReadOnly): assert islocked(instance) self.__finalized = True - self.plugins = tuple((k, tuple(v)) for k, v in plugin_info.items()) if not production_mode: lock(self) -- cgit