Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Implementation of mbed configuration mechanism
from tools.utils import json_file_to_dict
from tools.targets import CUMULATIVE_ATTRIBUTES, TARGET_MAP, \
generate_py_target, get_resolution_order
generate_py_target, get_resolution_order, Target

# Base class for all configuration exceptions
class ConfigException(Exception):
Expand Down
9 changes: 1 addition & 8 deletions tools/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,9 @@ def add_py_targets(new_targets):
in 'new_targets'. It is an error to add a target with a name that
already exists.
"""
crt_data = Target.get_json_target_data()
for target_key, target_value in new_targets.items():
if crt_data.has_key(target_key):
raise Exception(
"Attempt to add target '%s' that already exists"
% target_key)
# Add target data to the internal target dictionary
crt_data[target_key] = target_value
# Create the new target and add it to the relevant data structures
new_target = Target(target_key)
new_target = generate_py_target(new_targets, target_key)
TARGETS.append(new_target)
TARGET_MAP[target_key] = new_target
TARGET_NAMES.append(target_key)
Expand Down