summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Maat <tristan.maat@codethink.co.uk>2017-10-31 13:31:00 +0000
committerTristan Maat <tristan.maat@codethink.co.uk>2017-10-31 13:31:00 +0000
commite268c297788f8175ae82e8978e44222da8acad64 (patch)
treec6e9a239d2785bceeb15ea41ac5f8d0635e4a351
parent5e28b4a3de1f42a1d4240d429c1c85641da5f40c (diff)
downloadbuildstream-platform_singleton.tar.gz
Clean old Platform.get_platform referencesplatform_singleton
-rw-r--r--buildstream/_platform/platform.py2
-rw-r--r--buildstream/element.py2
-rw-r--r--tests/pipeline/load.py2
-rw-r--r--tests/plugins/pipeline.py2
-rw-r--r--tests/project/plugins.py2
-rw-r--r--tests/variables/variables.py2
6 files changed, 6 insertions, 6 deletions
diff --git a/buildstream/_platform/platform.py b/buildstream/_platform/platform.py
index d4b5f89a3..387abcb9a 100644
--- a/buildstream/_platform/platform.py
+++ b/buildstream/_platform/platform.py
@@ -65,7 +65,7 @@ class Platform():
cls._instance = PlatformImpl(*args, **kwargs)
@classmethod
- def get_platform(cls, *args, **kwargs):
+ def get_platform(cls):
if not cls._instance:
raise PlatformError("Platform needs to be initialized first")
return cls._instance
diff --git a/buildstream/element.py b/buildstream/element.py
index d66e6e8fb..7c1da4b5f 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1414,7 +1414,7 @@ class Element(Plugin):
def __sandbox(self, directory, stdout=None, stderr=None):
context = self.get_context()
project = self.get_project()
- platform = Platform.get_platform(context, project)
+ platform = Platform.get_platform()
if directory is not None and os.path.exists(directory):
sandbox = platform.create_sandbox(context, project,
diff --git a/tests/pipeline/load.py b/tests/pipeline/load.py
index d66c70e96..33d49bb31 100644
--- a/tests/pipeline/load.py
+++ b/tests/pipeline/load.py
@@ -19,7 +19,7 @@ def create_pipeline(tmpdir, basedir, target):
context.deploydir = os.path.join(str(tmpdir), 'deploy')
context.artifactdir = os.path.join(str(tmpdir), 'artifact')
- context._platform = Platform.get_platform(context, project)
+ context._platform = Platform.get_platform()
return Pipeline(context, project, target)
diff --git a/tests/plugins/pipeline.py b/tests/plugins/pipeline.py
index 792dd1996..1ff248178 100644
--- a/tests/plugins/pipeline.py
+++ b/tests/plugins/pipeline.py
@@ -19,7 +19,7 @@ def create_pipeline(tmpdir, basedir, target):
context.deploydir = os.path.join(str(tmpdir), 'deploy')
context.artifactdir = os.path.join(str(tmpdir), 'artifact')
- context._platform = Platform.get_platform(context, project)
+ context._platform = Platform.get_platform()
return Pipeline(context, project, target)
diff --git a/tests/project/plugins.py b/tests/project/plugins.py
index 19bbc0353..67dc691d7 100644
--- a/tests/project/plugins.py
+++ b/tests/project/plugins.py
@@ -17,7 +17,7 @@ def create_pipeline(tmpdir, basedir, target):
context = Context([], 'x86_64')
project = Project(basedir, context)
context.artifactdir = os.path.join(str(tmpdir), 'artifact')
- context._platform = Platform.get_platform(context, project)
+ context._platform = Platform.get_platform()
return Pipeline(context, project, target)
diff --git a/tests/variables/variables.py b/tests/variables/variables.py
index 61cf26c82..8c5db0a19 100644
--- a/tests/variables/variables.py
+++ b/tests/variables/variables.py
@@ -16,7 +16,7 @@ def create_pipeline(tmpdir, basedir, target):
context = Context([], 'x86_64')
project = Project(basedir, context)
context.artifactdir = os.path.join(str(tmpdir), 'artifact')
- context._platform = Platform.get_platform(context, project)
+ context._platform = Platform.get_platform()
return Pipeline(context, project, target)