forked from M-Labs/artiq
1
0
Fork 0

language/environment: fix set_* with parent

This commit is contained in:
Sebastien Bourdeauducq 2015-08-28 10:00:04 +08:00
parent 90ce54d8d5
commit ebfd8c937c
1 changed files with 2 additions and 0 deletions

View File

@ -220,6 +220,7 @@ class HasEnvironment:
"""Writes the value of a parameter into the parameter database.""" """Writes the value of a parameter into the parameter database."""
if self.__parent is not None: if self.__parent is not None:
self.__parent.set_parameter(key, value) self.__parent.set_parameter(key, value)
return
if self.__pdb is None: if self.__pdb is None:
raise ValueError("Parameter database not present") raise ValueError("Parameter database not present")
self.__pdb.set(key, value) self.__pdb.set(key, value)
@ -236,6 +237,7 @@ class HasEnvironment:
""" """
if self.__parent is not None: if self.__parent is not None:
self.__parent.set_result(key, value, realtime, store) self.__parent.set_result(key, value, realtime, store)
return
if self.__rdb is None: if self.__rdb is None:
raise ValueError("Result database not present") raise ValueError("Result database not present")
if realtime: if realtime: