Skip to content

Commit

Permalink
add repo path to base env when loading libs
Browse files Browse the repository at this point in the history
  • Loading branch information
trehn committed Mar 16, 2015
1 parent f2417f9 commit 54d6f0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bundlewrap/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ def __setstate__(self, state):
self.__path = state


def nodes_from_file(filepath, libs):
def nodes_from_file(filepath, libs, repo_path):
"""
Returns a list of nodes as defined in the given nodes.py.
"""
try:
flat_node_dict = utils.getattr_from_file(
filepath,
'nodes',
base_env={'libs': libs},
base_env={'libs': libs, 'repo_path': repo_path},
)
except KeyError:
raise RepositoryError(
Expand Down Expand Up @@ -427,7 +427,7 @@ def populate_from_path(self, path):

# populate nodes
self.node_dict = {}
for node in nodes_from_file(self.nodes_file, self.libs):
for node in nodes_from_file(self.nodes_file, self.libs, self.path):
self.add_node(node)

@utils.cached_property
Expand Down

0 comments on commit 54d6f0f

Please sign in to comment.