mirror of https://github.com/m-labs/artiq.git
language/environment: only call prepare automatically if it exists
This commit is contained in:
parent
7efd990541
commit
6aaf6c8789
|
@ -380,8 +380,9 @@ class EnvExperiment(Experiment, HasEnvironment):
|
|||
Most experiment should derive from this class."""
|
||||
def prepare(self):
|
||||
"""The default prepare method calls prepare for all children, in the
|
||||
order of instantiation."""
|
||||
order of instantiation, if the child has a prepare method."""
|
||||
for child in self.children:
|
||||
if hasattr(child, "prepare"):
|
||||
child.prepare()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue