From 9303c70727975676f3e0ee136915fda600c80b80 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 1 Mar 2018 16:32:12 +0000 Subject: [PATCH] fw/target/descriptor: fixes - fix TargetDescription._set to set lists rather than dicts for params to be consistent with how params are set after creation (should probably get rid of this entirely...) - fix the comment describing the structure of TARGETS --- wa/framework/target/descriptor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wa/framework/target/descriptor.py b/wa/framework/target/descriptor.py index 1b48ba57..d05bd8b3 100644 --- a/wa/framework/target/descriptor.py +++ b/wa/framework/target/descriptor.py @@ -117,10 +117,10 @@ class TargetDescription(object): def _set(self, attr, vals): if vals is None: - vals = {} + vals = [] elif isiterable(vals): - if not hasattr(vals, 'iteritems'): - vals = {v.name: v for v in vals} + if hasattr(vals, 'values'): + vals = v.values() else: msg = '{} must be iterable; got "{}"' raise ValueError(msg.format(attr, vals)) @@ -374,7 +374,7 @@ CONNECTION_PARAMS['ChromeOsConnection'] = \ CONNECTION_PARAMS[AdbConnection] + CONNECTION_PARAMS[SshConnection] -# name --> ((target_class, conn_class), params_list, defaults, assistant_class) +# name --> ((target_class, conn_class), params_list, defaults) TARGETS = { 'linux': ((LinuxTarget, SshConnection), COMMON_TARGET_PARAMS, None), 'android': ((AndroidTarget, AdbConnection), COMMON_TARGET_PARAMS +