1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

framework/workload: make "no matching package" message more useful

Make the error message reported when no matching Android app package
could be found more useful by including the workload name, and, if
applicable, sought version.
This commit is contained in:
Sergei Trofimov 2018-02-09 17:39:08 +00:00 committed by Marc Bonnici
parent 0d225dc128
commit 42fb3eb148

View File

@ -705,7 +705,11 @@ class PackageHandler(object):
raise WorkloadError(msg)
if not self.package_name:
raise WorkloadError('No matching package found')
if self.version:
message = 'No matching package found for workload {name} (version {version})'
else:
message = 'No matching package found for workload {name}'
raise WorkloadError(message.format(name=self.name, version=self.version))
self.pull_apk(self.package_name)
self.apk_file = context.resolver.get(ApkFile(self.owner,