Merge pull request #13031 from dgreen-arm/add-feature-experimental-5.15

Mbed OS 5.15: Warn on unrecognised error
pull/13125/head
Martin Kojtal 2020-06-08 13:23:51 +02:00 committed by GitHub
commit d0fb06e381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -1354,10 +1354,13 @@ class Config(object):
self.cumulative_overrides['features']\
.update_target(self.target)
for feature in self.target.features:
# Features that don't appear in ALLOWED_FEATURES should be removed
# with a warning so that they don't do anything unexpected.
# Iterate over a copy of the set to remove them safely.
for feature in list(self.target.features):
if feature not in ALLOWED_FEATURES:
raise ConfigException(
"Feature '%s' is not a supported features" % feature)
print("[WARNING] Feature '%s' is not a supported feature" % feature)
self.target.features.remove(feature)
return self.target.features