From 58fc5628c4fdb6911b3ea57cdc8e0ad7790dd447 Mon Sep 17 00:00:00 2001 From: Jonathan Maw Date: Fri, 13 Oct 2017 12:01:34 +0100 Subject: Make all element loading require a yaml file Every element should have an accompanying .yaml file, if not for defaults then for documentation. --- buildstream/element.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/buildstream/element.py b/buildstream/element.py index 05c92aa19..17c553946 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1448,13 +1448,8 @@ class Element(Plugin): # if not self.__defaults_set: - # Load the plugin's accompanying .yaml file if one was provided - defaults = {} - try: - defaults = _yaml.load(plugin_conf, os.path.basename(plugin_conf)) - except LoadError as e: - if e.reason != LoadErrorReason.MISSING_FILE: - raise e + # Load the plugin's accompanying .yaml file. Plugins must have a .yaml file. + defaults = _yaml.load(plugin_conf, os.path.basename(plugin_conf)) # Special case; compose any element-wide split-rules declarations self.__compose_default_splits(defaults) -- cgit v1.2.1