diff options
author | Jürg Billeter <j@bitron.ch> | 2018-09-26 10:09:07 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2019-04-14 16:25:19 +0900 |
commit | 19f0c1ff4c4a8f53a4c07f48745381d223969d31 (patch) | |
tree | 9653944657eb299dd08712413437a838dcbd2595 | |
parent | 2badd7f71e0d0baed343f2c5772a6c00bffb8df4 (diff) | |
download | buildstream-19f0c1ff4c4a8f53a4c07f48745381d223969d31.tar.gz |
_platform: Remove unused context
-rw-r--r-- | buildstream/_frontend/app.py | 2 | ||||
-rw-r--r-- | buildstream/_platform/linux.py | 4 | ||||
-rw-r--r-- | buildstream/_platform/platform.py | 7 | ||||
-rw-r--r-- | buildstream/_platform/unix.py | 4 |
4 files changed, 7 insertions, 10 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py index 553dae283..a07fe9860 100644 --- a/buildstream/_frontend/app.py +++ b/buildstream/_frontend/app.py @@ -199,7 +199,7 @@ class App(): if option_value is not None: setattr(self.context, context_attr, option_value) try: - Platform.create_instance(self.context) + Platform.create_instance() except BstError as e: self._error_exit(e, "Error instantiating platform") diff --git a/buildstream/_platform/linux.py b/buildstream/_platform/linux.py index 2dfe72ac7..7af1a2283 100644 --- a/buildstream/_platform/linux.py +++ b/buildstream/_platform/linux.py @@ -30,9 +30,9 @@ from . import Platform class Linux(Platform): - def __init__(self, context): + def __init__(self): - super().__init__(context) + super().__init__() self._uid = os.geteuid() self._gid = os.getegid() diff --git a/buildstream/_platform/platform.py b/buildstream/_platform/platform.py index a6051aabb..bbd2e65ab 100644 --- a/buildstream/_platform/platform.py +++ b/buildstream/_platform/platform.py @@ -31,11 +31,8 @@ class Platform(): # A class to manage platform-specific details. Currently holds the # sandbox factory as well as platform helpers. # - # Args: - # context (context): The project context - # - def __init__(self, context): - self.context = context + def __init__(self): + pass @classmethod def create_instance(cls, *args, **kwargs): diff --git a/buildstream/_platform/unix.py b/buildstream/_platform/unix.py index 3bd86e0ac..7aa8cbc0d 100644 --- a/buildstream/_platform/unix.py +++ b/buildstream/_platform/unix.py @@ -27,9 +27,9 @@ from . import Platform class Unix(Platform): - def __init__(self, context): + def __init__(self): - super().__init__(context) + super().__init__() self._uid = os.geteuid() self._gid = os.getegid() |