From d7fa71cad19746eac819e1665bd4647b2cb8cc3f Mon Sep 17 00:00:00 2001 From: Thomas Coldrick Date: Thu, 29 Aug 2019 14:53:46 +0100 Subject: 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. --- src/buildstream/plugins/sources/patch.py | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.2.1