Skip to content

Commit d0fb06e

Browse files
authored
Merge pull request #13031 from dgreen-arm/add-feature-experimental-5.15
Mbed OS 5.15: Warn on unrecognised error
2 parents 1dd5069 + cd1b59b commit d0fb06e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/config/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,10 +1354,13 @@ def get_features(self):
13541354
self.cumulative_overrides['features']\
13551355
.update_target(self.target)
13561356

1357-
for feature in self.target.features:
1357+
# Features that don't appear in ALLOWED_FEATURES should be removed
1358+
# with a warning so that they don't do anything unexpected.
1359+
# Iterate over a copy of the set to remove them safely.
1360+
for feature in list(self.target.features):
13581361
if feature not in ALLOWED_FEATURES:
1359-
raise ConfigException(
1360-
"Feature '%s' is not a supported features" % feature)
1362+
print("[WARNING] Feature '%s' is not a supported feature" % feature)
1363+
self.target.features.remove(feature)
13611364

13621365
return self.target.features
13631366

0 commit comments

Comments
 (0)