File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed
Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 2020# Implementation of mbed configuration mechanism
2121from tools .utils import json_file_to_dict
2222from tools .targets import CUMULATIVE_ATTRIBUTES , TARGET_MAP , \
23- generate_py_target , get_resolution_order
23+ generate_py_target , get_resolution_order , Target
2424
2525# Base class for all configuration exceptions
2626class ConfigException (Exception ):
Original file line number Diff line number Diff line change @@ -266,16 +266,9 @@ def add_py_targets(new_targets):
266266 in 'new_targets'. It is an error to add a target with a name that
267267 already exists.
268268 """
269- crt_data = Target .get_json_target_data ()
270269 for target_key , target_value in new_targets .items ():
271- if crt_data .has_key (target_key ):
272- raise Exception (
273- "Attempt to add target '%s' that already exists"
274- % target_key )
275- # Add target data to the internal target dictionary
276- crt_data [target_key ] = target_value
277270 # Create the new target and add it to the relevant data structures
278- new_target = Target ( target_key )
271+ new_target = generate_py_target ( new_targets , target_key )
279272 TARGETS .append (new_target )
280273 TARGET_MAP [target_key ] = new_target
281274 TARGET_NAMES .append (target_key )
You can’t perform that action at this time.
0 commit comments