diff options
author | Jürg Billeter <j@bitron.ch> | 2016-12-15 13:16:53 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-12-31 17:36:38 -0500 |
commit | 6688428cd089c639ec114814480514738b4dd667 (patch) | |
tree | 6eb32213d4e8a493f86eca64fd1624bb5aa989f2 /buildstream/_elementfactory.py | |
parent | efeec0d625fd00386c0cf47a8f90b846249798e5 (diff) | |
download | buildstream-6688428cd089c639ec114814480514738b4dd667.tar.gz |
element.py: Initial skeleton for base class
Diffstat (limited to 'buildstream/_elementfactory.py')
-rw-r--r-- | buildstream/_elementfactory.py | 13 |
1 files changed, 9 insertions, 4 deletions
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) |