diff options
author | Sergei Trofimov <sergei.trofimov@arm.com> | 2018-03-01 16:32:12 +0000 |
---|---|---|
committer | Marc Bonnici <marc.bonnici@arm.com> | 2018-03-08 11:18:12 +0000 |
commit | 9303c70727975676f3e0ee136915fda600c80b80 (patch) | |
tree | 147b542f9d41e872c15b7921919d1619eec6142f | |
parent | 879dfc77005e4e97b734153fd341ce3f479db52a (diff) |
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
-rw-r--r-- | wa/framework/target/descriptor.py | 8 |
1 files 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 + |