File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
src/mbed_tools/build/_internal/config
tests/build/_internal/config Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ Support compilation of targets with sector attributes in targets.json.
Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ def prepare(
44
44
namespace = data .pop ("name" , source_name )
45
45
for key in data :
46
46
if isinstance (data [key ], list ):
47
- data [key ] = set (data [key ])
48
-
47
+ try :
48
+ data [key ] = set (data [key ])
49
+ except TypeError :
50
+ data [key ] = set (* data [key ])
49
51
if "config" in data :
50
52
data ["config" ] = _extract_config_settings (namespace , data ["config" ])
51
53
Original file line number Diff line number Diff line change @@ -109,8 +109,10 @@ def test_converts_config_setting_value_lists_to_sets(self):
109
109
lib = {
110
110
"name" : "library" ,
111
111
"config" : {"list-values" : {"value" : ["ETHERNET" , "WIFI" ]}},
112
+ "sectors" : [[0 , 2048 ]],
112
113
}
113
114
114
115
conf = source .prepare (lib )
115
116
116
117
assert conf ["config" ][0 ].value == {"ETHERNET" , "WIFI" }
118
+ assert conf ["sectors" ] == {0 , 2048 }
You can’t perform that action at this time.
0 commit comments