summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_yaml.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/buildstream/_yaml.py b/buildstream/_yaml.py
index 527f5371c..5ba540fc9 100644
--- a/buildstream/_yaml.py
+++ b/buildstream/_yaml.py
@@ -180,9 +180,6 @@ class CompositePolicy(Enum):
# Arrays from the overriding dict are appended to arrays in the target dict
ARRAY_APPEND = 2
- # Dictionary memebers may never replace existing members
- STRICT = 3
-
# Loads a dictionary from some YAML
#
@@ -519,17 +516,8 @@ def composite_dict(target, source, policy=CompositePolicy.OVERWRITE, typesafe=Fa
target[key] = source_value
target_provenance.members[key] = source_provenance.members[key].clone()
- elif policy == CompositePolicy.STRICT:
-
- if target_value is None:
- target[key] = source_value
- target_provenance.members[key] = source_provenance.members[key]
- else:
- raise CompositeOverrideError(thispath)
-
- else:
- # Explicitly unhandled: Indicates a clear programming error
- raise Exception("Unhandled CompositePolicy in switch case")
+ else: # pragma: no cover
+ raise ValueError("Unhandled CompositePolicy in switch case")
# Like composite_dict(), but raises an all purpose LoadError for convenience