提交 c3cebc0f 编写于 作者: X Xi Chen

fix #5902

上级 7333df85
......@@ -140,8 +140,13 @@ def init_config_environment(
g_submodel_stack=[],
g_add_submodel_suffix=False, ):
for k, v in locals().iteritems():
globals()[k] = copy.deepcopy(v)
# directly iterate through locals().iteritems() will change
# the size of locals() due to introducting k, v into scope
# which will break the process in some env
local_vars = copy.deepcopy(locals())
for k, v in local_vars.iteritems():
globals()[k] = v
# Because type is widely used as a variable name in this code.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册