Skip to content

Commit

Permalink
Correctly update imported plan environment
Browse files Browse the repository at this point in the history
The `environemnt` is a property of the `Plan` class that modifies
the plan environment stored in the `_environment` dictionary.

If we call `update` on the dictionary it does not really modify the
`_environment` dictionary.

I believe we need to modify the `_environment` dictionary

Resolves #2446

Signed-off-by: Miroslav Vadkerti <[email protected]>
  • Loading branch information
thrix committed Nov 3, 2023
1 parent 0b95455 commit 627853f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tmt/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@ def import_plan(self) -> Optional['Plan']:
self._imported_plan._original_plan = self

# Update imported plan environment with the local environment
self._imported_plan.environment.update(self.environment)
self._imported_plan._environment.update(self.environment)
with tmt.utils.modify_environ(self.environment):
self._expand_node_data(node.data, {
key: ','.join(value)
Expand Down

0 comments on commit 627853f

Please sign in to comment.