Skip to content
Snippets Groups Projects
Commit c0584183 authored by Jonathan Maw's avatar Jonathan Maw
Browse files

_project.py: Rename _ensure_project_dir to _find_project_dir

parent 3b6aa5c4
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ class Project(): ...@@ -95,7 +95,7 @@ class Project():
self.name = None self.name = None
# The project directory # The project directory
self.directory = self._ensure_project_dir(directory) self.directory = self._find_project_dir(directory)
# Absolute path to where elements are loaded from within the project # Absolute path to where elements are loaded from within the project
self.element_path = None self.element_path = None
...@@ -647,7 +647,7 @@ class Project(): ...@@ -647,7 +647,7 @@ class Project():
# Source url aliases # Source url aliases
output._aliases = _yaml.node_get(config, Mapping, 'aliases', default_value={}) output._aliases = _yaml.node_get(config, Mapping, 'aliases', default_value={})
# _ensure_project_dir() # _find_project_dir()
# #
# Returns path of the project directory, if a configuration file is found # Returns path of the project directory, if a configuration file is found
# in given directory or any of its parent directories. # in given directory or any of its parent directories.
...@@ -658,7 +658,7 @@ class Project(): ...@@ -658,7 +658,7 @@ class Project():
# Raises: # Raises:
# LoadError if project.conf is not found # LoadError if project.conf is not found
# #
def _ensure_project_dir(self, directory): def _find_project_dir(self, directory):
directory = os.path.abspath(directory) directory = os.path.abspath(directory)
while not os.path.isfile(os.path.join(directory, _PROJECT_CONF_FILE)): while not os.path.isfile(os.path.join(directory, _PROJECT_CONF_FILE)):
parent_dir = os.path.dirname(directory) parent_dir = os.path.dirname(directory)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment