未验证 提交 f254d876 编写于 作者: D Darcy 提交者: GitHub

Merge pull request #7891 from putcn/fix_5902

Fix 5902
......@@ -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 introducing 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.
先完成此消息的编辑!
想要评论请 注册