From 6308f99b9da7a6757a8c80c8074407e52dbc98f9 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Fri, 8 Dec 2017 14:24:23 +0000 Subject: [PATCH] commands/revent: Fix revent for non android based workloads Previously recording an revent workload would assume an android based revent workload with an apk. Now only deploy apk if present for workload. --- wa/commands/revent.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wa/commands/revent.py b/wa/commands/revent.py index 8cafd4f9..2408fb21 100644 --- a/wa/commands/revent.py +++ b/wa/commands/revent.py @@ -184,9 +184,11 @@ class RecordCommand(Command): self.logger.info('Deploying {}'.format(args.workload)) workload = pluginloader.get_workload(args.workload, self.target) - workload.apk.initialize(context) - workload.apk.setup(context) - sleep(workload.loading_time) + # Setup apk if android workload + if hasattr(workload, 'apk'): + workload.apk.initialize(context) + workload.apk.setup(context) + sleep(workload.loading_time) output_path = os.path.join(workload.dependencies_directory, 'revent_files')