Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #127 from pypeclub/bugfix/multiroot_cleanup
Browse files Browse the repository at this point in the history
Bugfix/multiroot cleanup
  • Loading branch information
mkolar authored May 14, 2020
2 parents 97d284e + a72b6b0 commit 0a409f5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions avalon/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ class Application(Action):
config = None

def is_compatible(self, session):
required = ["AVALON_PROJECTS",
"AVALON_PROJECT",
required = ["AVALON_PROJECT",
"AVALON_ASSET",
"AVALON_TASK"]
missing = [x for x in required if x not in session]
Expand Down Expand Up @@ -367,7 +366,10 @@ def environ(self, session):
tools_attr.append(session["AVALON_APP_NAME"])

# collect all the 'environment' attributes from parents
asset = io.find_one({"type": "asset"})
asset = io.find_one({
"type": "asset",
"name": session["AVALON_ASSET"]
})
tools = self.find_tools(asset)
tools_attr.extend(tools)

Expand All @@ -377,9 +379,8 @@ def environ(self, session):
env = acre.append(dict(os.environ), dyn_env)

# Build environment
# env = os.environ.copy()
env.update(self.config.get("environment", {}))
# env.update(dyn_env)
env.update(anatomy.root_environments())
env.update(session)

return env
Expand Down

0 comments on commit 0a409f5

Please sign in to comment.