Fix gates conversion & drop artifacts
Previously the code would crash with a use before assignment, as for the
variables the reference to self has been missing.
This patch fixes this oversight.
Additionally the obsolete artificats field was affected as well and has
been dropped with it.
@@ -433,15 +433,11 @@ class Plan(Node):
self.finish = tmt.steps.finish.Finish(
self.node.get('finish'), self)
- # Relevant artifacts & gates (convert to list if needed)
- self.artifacts = node.get('artifacts')
- if self.artifacts:
- if not isinstance(artifacts, list):
- artifacts = [artifacts]
+ # Relevant gates (convert to list if needed)
self.gates = node.get('gates')
if self.gates:
- if not isinstance(gates, list):
- gates = [gates]
+ if not isinstance(self.gates, list):
+ self.gates = [self.gates]
# Environment variables, make sure that values are string
self._environment = dict([
