From 9f06950fb1f25a4fd89cd73b6f87a413d748fa3b Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Tue, 19 Jun 2018 10:01:39 +0100 Subject: [PATCH] fw/target: account for platform_target_defaults When iterating over PLATFORMS tuples, account for the platform_target_defaults introduced by 7470fb5ee. Also, correct the tuple description in the comments. --- wa/framework/target/descriptor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wa/framework/target/descriptor.py b/wa/framework/target/descriptor.py index 91ecbf5c..22aa61be 100644 --- a/wa/framework/target/descriptor.py +++ b/wa/framework/target/descriptor.py @@ -416,7 +416,7 @@ ASSISTANTS = { 'chromeos': ChromeOsAssistant } -# name --> (((platform_class, conn_class), params_list, defaults), target_defaults) +# name --> ((platform_class, conn_class), params_list, defaults, target_defaults) # Note: normally, connection is defined by the Target name, but # platforms may choose to override it # Note: the target_defaults allows you to override common target_params for a @@ -556,7 +556,7 @@ def add_description_for_target(target, description=None, **kwargs): if 'platform' not in kwargs: kwargs['platform'] = Platform if 'platform_params' not in kwargs: - for (plat, conn), params, _ in PLATFORMS.values(): + for (plat, conn), params, _, _ in PLATFORMS.values(): if plat == kwargs['platform']: kwargs['platform_params'] = params if conn is not None and kwargs['conn'] is None: