When python task is in the recipe xml with other xml tasks specified before, the sync_table gets overwritten by default resources.
This is because the res_table is copied from the default resources in the loop for every task in the recipe.
The fix is to move initialization of res_table before the loop.
Signed-off-by: Jan Tluka jtluka@redhat.com --- lnst/Controller/NetTestController.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py index 6484c99..0e9b546 100644 --- a/lnst/Controller/NetTestController.py +++ b/lnst/Controller/NetTestController.py @@ -264,8 +264,8 @@ class NetTestController:
sync_table = {'module': {}, 'tools': {}} if resource_sync: + res_table = copy.deepcopy(self._resource_table) for task in self._recipe['tasks']: - res_table = copy.deepcopy(self._resource_table) if 'module_dir' in task: modules = self._load_test_modules([task['module_dir']]) res_table['module'].update(modules)
On Tue, Apr 05, 2016 at 04:17:18PM +0200, Jan Tluka wrote:
When python task is in the recipe xml with other xml tasks specified before, the sync_table gets overwritten by default resources.
This is because the res_table is copied from the default resources in the loop for every task in the recipe.
The fix is to move initialization of res_table before the loop.
Signed-off-by: Jan Tluka jtluka@redhat.com
Acked-by: Ondrej Lichtner olichtne@redhat.com
lnst-developers@lists.fedorahosted.org