提交 292ab4e2 authored 作者: Yikang Shen's avatar Yikang Shen

fix bug

上级 a6baa2e8
...@@ -527,8 +527,8 @@ class Variable(Node): ...@@ -527,8 +527,8 @@ class Variable(Node):
d = self.__dict__.copy() d = self.__dict__.copy()
d.pop("_fn_cache", None) d.pop("_fn_cache", None)
if (not config.pickle_test_value) \ if (not config.pickle_test_value) \
and (hasattr(self.tag, 'test_value')) \ and (hasattr(self.tag, 'test_value')):
and (not type(config).pickle_test_value.is_default): if not type(config).pickle_test_value.is_default:
warnings.warn("pickle_test_value is not defaut value (True).\n" warnings.warn("pickle_test_value is not defaut value (True).\n"
"Test value of variable %s(%s) will not be dumped." % (d['auto_name'], d['name'])) "Test value of variable %s(%s) will not be dumped." % (d['auto_name'], d['name']))
t = copy(d["tag"]) t = copy(d["tag"])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论