未验证 提交 a19f1303 编写于 作者: P Pradyun Gedam 提交者: GitHub

Merge pull request #9156 from jdufresne/resource-warning

Always close stderr after subprocess completion in call_subprocess()
Fix ResourceWarning in VCS subprocesses
......@@ -150,6 +150,8 @@ def call_subprocess(
finally:
if proc.stdout:
proc.stdout.close()
if proc.stderr:
proc.stderr.close()
proc_had_error = (
proc.returncode and proc.returncode not in extra_ok_returncodes
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册