Filter out internal magic and connection variables from facts returns

Fixes #15925
This commit is contained in:
Thomas Quinot 2016-10-24 13:05:56 -05:00 committed by James Cammarata
parent 54caf3c5d5
commit 236c923c25
2 changed files with 32 additions and 0 deletions

View file

@ -373,6 +373,7 @@ class PluginLoader:
def all(self, *args, **kwargs):
''' instantiates all plugins with the same arguments '''
path_only = kwargs.pop('path_only', False)
class_only = kwargs.pop('class_only', False)
all_matches = []
found_in_cache = True
@ -385,6 +386,10 @@ class PluginLoader:
if '__init__' in name:
continue
if path_only:
yield path
continue
if path not in self._module_cache:
self._module_cache[path] = self._load_module_source(name, path)
found_in_cache = False