Use templar all the way down

Fixes bugs related to creating Templar() objects on the fly, where
the shared loader objects (serialized to TaskExecutor) aren't used
so information loaded into plugin loaders after forking is lost.

Fixes #11815
This commit is contained in:
James Cammarata 2015-08-04 12:10:23 -04:00
commit 5266679964
15 changed files with 44 additions and 42 deletions

View file

@ -29,16 +29,16 @@ class LookupModule(LookupBase):
[1, 2, 3], [a, b] -> [1, a], [1, b], [2, a], [2, b], [3, a], [3, b]
"""
def __lookup_variabless(self, terms, variables):
def __lookup_variables(self, terms):
results = []
for x in terms:
intermediate = listify_lookup_plugin_terms(x, variables, loader=self._loader)
intermediate = listify_lookup_plugin_terms(x, templar=self._templar, loader=self._loader)
results.append(intermediate)
return results
def run(self, terms, variables=None, **kwargs):
terms = self.__lookup_variabless(terms, variables)
terms = self.__lookup_variables(terms)
my_list = terms[:]
if len(my_list) == 0: