diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-16 18:26:05 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-16 18:26:05 +0900 |
commit | cd90fbde079ac42e930c45fcab509d49205fe54c (patch) | |
tree | fcac2d2304d943ecc07eca1f8d51359e47acaec9 /buildstream/_sourcefactory.py | |
parent | ca2331c3f314ff53428b5ca9c8c2efc9d2dbd7cc (diff) | |
download | buildstream-cd90fbde079ac42e930c45fcab509d49205fe54c.tar.gz |
Clean up element/source instantiation code paths.
This removes the extra `kind` parameter from all of the related
codepaths, it is redundant since the `kind` attribute is already
stored on the MetaElement and MetaSource objects.
Diffstat (limited to 'buildstream/_sourcefactory.py')
-rw-r--r-- | buildstream/_sourcefactory.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/buildstream/_sourcefactory.py b/buildstream/_sourcefactory.py index 09bf1b04a..dad3ddf68 100644 --- a/buildstream/_sourcefactory.py +++ b/buildstream/_sourcefactory.py @@ -42,7 +42,6 @@ class SourceFactory(PluginContext): # objects on demand for a given pipeline. # # Args: - # kind (str): The kind of Source to create # context (object): The Context object for processing # project (object): The project object # meta (object): The loaded MetaSource @@ -54,6 +53,6 @@ class SourceFactory(PluginContext): # PluginError (if the kind lookup failed) # LoadError (if the source itself took issue with the config) # - def create(self, kind, context, project, meta): - source_type, _ = self.lookup(kind) + def create(self, context, project, meta): + source_type, _ = self.lookup(meta.kind) return source_type(context, project, meta) |