summaryrefslogtreecommitdiff
path: root/buildstream/plugin.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-11-06 20:24:29 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-11-06 20:31:31 +0900
commita97c0fd86a17db72edb26f91bab9364da533fd21 (patch)
tree0c8efc0154e9533429a06d9ffd61b4b64a9fa640 /buildstream/plugin.py
parent79f9f065d7f22039ec189d59f557bbe00123eacd (diff)
downloadbuildstream-a97c0fd86a17db72edb26f91bab9364da533fd21.tar.gz
refactoring: Made Project option private
This required adding two new APIs to make up for it on the Source o get_project_directory() Added here because elements should not be accessing external resources, Sources needed for local files and GPG keys and such o translate_url() Used by sources to mish-mash the project aliases and create real urls.
Diffstat (limited to 'buildstream/plugin.py')
-rw-r--r--buildstream/plugin.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/buildstream/plugin.py b/buildstream/plugin.py
index abbed7dca..56bee90c1 100644
--- a/buildstream/plugin.py
+++ b/buildstream/plugin.py
@@ -184,14 +184,6 @@ class Plugin():
"""
return self.__context
- def get_project(self):
- """Fetches the project
-
- Returns:
- (object): The :class:`.Project`
- """
- return self.__project
-
def node_items(self, node):
"""Iterate over a dictionary loaded from YAML
@@ -570,6 +562,13 @@ class Plugin():
# Private Methods used in BuildStream #
#############################################################
+ # _get_project()
+ #
+ # Fetches the project object associated with this plugin
+ #
+ def _get_project(self):
+ return self.__project
+
# _get_unique_id():
#
# Fetch the plugin's unique identifier