summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Coldrick <othko97@gmail.com>2019-08-29 14:53:46 +0100
committerThomas Coldrick <othko97@gmail.com>2019-08-29 14:55:37 +0100
commit09e8e1619712c256ba268ad4c65b82efe56ef793 (patch)
tree94b9ddb8c3dad8a56ed5319135b60084f0686a1c
parentb794f058c0ff2709ae6a382fff5744a98da97c76 (diff)
downloadbuildstream-coldtom/validate-patch.tar.gz
plugins/sources/patch.py: Validate keyscoldtom/validate-patch
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)