From 6688428cd089c639ec114814480514738b4dd667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Thu, 15 Dec 2016 13:16:53 +0100 Subject: element.py: Initial skeleton for base class --- buildstream/_elementfactory.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'buildstream/_elementfactory.py') diff --git a/buildstream/_elementfactory.py b/buildstream/_elementfactory.py index c0ccf2001..3603a0612 100644 --- a/buildstream/_elementfactory.py +++ b/buildstream/_elementfactory.py @@ -46,12 +46,17 @@ class ElementFactory(PluginContext): # objects on demand for a given pipeline. # # Args: - # kind (str): The kind of Element to create + # kind (str): The kind of Element to create + # context (object): The Context object for processing + # project (object): The project object + # meta (object): The loaded MetaElement # # Returns: A newly created Element object of the appropriate kind # - # Raises: PluginError + # Raises: + # PluginError (if the kind lookup failed) + # LoadError (if the element itself took issue with the config) # - def create(self, kind): + def create(self, kind, context, project, meta): element_type = self.lookup(kind) - return element_type() + return element_type(context, project, meta) -- cgit v1.2.1