mirror of https://github.com/ARMmbed/mbed-os.git
Change unrecognised features to a warning, rather than error
Give a warning rather than error if an unrecognised feature is used. This will help compatibility when new features are added. Signed-off-by: Darryl Green <darryl.green@arm.com>pull/13003/head
parent
4e47c38701
commit
cf17d7a178
|
@ -1345,10 +1345,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 feature" % feature)
|
||||
print("[WARNING] Feature '%s' is not a supported feature" % feature)
|
||||
self.target.features.remove(feature)
|
||||
|
||||
return self.target.features
|
||||
|
||||
|
|
Loading…
Reference in New Issue