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 20
20
# Implementation of mbed configuration mechanism
21
21
from tools .utils import json_file_to_dict
22
22
from tools .targets import CUMULATIVE_ATTRIBUTES , TARGET_MAP , \
23
- generate_py_target , get_resolution_order
23
+ generate_py_target , get_resolution_order , Target
24
24
25
25
# Base class for all configuration exceptions
26
26
class ConfigException (Exception ):
Original file line number Diff line number Diff line change @@ -266,16 +266,9 @@ def add_py_targets(new_targets):
266
266
in 'new_targets'. It is an error to add a target with a name that
267
267
already exists.
268
268
"""
269
- crt_data = Target .get_json_target_data ()
270
269
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
277
270
# 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 )
279
272
TARGETS .append (new_target )
280
273
TARGET_MAP [target_key ] = new_target
281
274
TARGET_NAMES .append (target_key )
You can’t perform that action at this time.
0 commit comments