From 74347b9e67e8355cf8d66458daa0477ca3bcf42a Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Mon, 27 Nov 2017 13:24:06 +0000 Subject: [PATCH] Framework/Workload: Change condition for pushing assets Changes from checking if there are deployable assets to checking for discovered assets. This allows for automated pushing of assets without invoking the resource getters, for example pre discovered files. --- wa/framework/workload.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wa/framework/workload.py b/wa/framework/workload.py index 64c5907c..eedcbb62 100644 --- a/wa/framework/workload.py +++ b/wa/framework/workload.py @@ -91,7 +91,7 @@ class Workload(TargetedPlugin): workload instance, i.e., unlike ``setup()`` it will not be invoked on each iteration. """ - if self.deployable_assets: + if self.asset_files: self.deploy_assets(context) def setup(self, context): @@ -145,8 +145,8 @@ class Workload(TargetedPlugin): else: self.target.execute('mkdir -p {}'.format(self.asset_directory)) - for i, asset in enumerate(self.deployable_assets): - self.target.push(self.asset_files[i], self.asset_directory) + for asset in self.asset_files: + self.target.push(asset, self.asset_directory) self.deployed_assets.append(self.target.path.join(self.asset_directory, asset))