summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Coldrick <othko97@gmail.com>2019-08-29 14:53:46 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-09-02 14:30:31 +0000
commitd7fa71cad19746eac819e1665bd4647b2cb8cc3f (patch)
tree5de1e6f637e37eaf499bbe063e0af204e3067d1d
parent1fe88ee6d419b17e36e535e9ca7397a5ee8ac2e7 (diff)
downloadbuildstream-d7fa71cad19746eac819e1665bd4647b2cb8cc3f.tar.gz
plugins/sources/patch.py: Validate keys
Currently we don't validate the keys on a `patch` source, leading to nastier-looking error messages when `path` is missing. This simply makes us validate the yaml, as we do for other plugins.
-rw-r--r--src/buildstream/plugins/sources/patch.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buildstream/plugins/sources/patch.py b/src/buildstream/plugins/sources/patch.py
index 1e70039bd..24b5bfe2f 100644
--- a/src/buildstream/plugins/sources/patch.py
+++ b/src/buildstream/plugins/sources/patch.py
@@ -55,6 +55,7 @@ class PatchSource(Source):
BST_REQUIRES_PREVIOUS_SOURCES_STAGE = True
def configure(self, node):
+ node.validate_keys(["path", "strip-level", *Source.COMMON_CONFIG_KEYS])
self.path = self.node_get_project_path(node.get_scalar('path'),
check_is_file=True)
self.strip_level = node.get_int("strip-level", default=1)