mirror of
https://github.com/golang/go.git
synced 2025-11-06 11:40:59 +00:00
codereview: use cmd.communicate.
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4145046
This commit is contained in:
parent
642c774081
commit
3108f3f4a0
1 changed files with 2 additions and 4 deletions
|
|
@ -1146,10 +1146,8 @@ def clpatch(ui, repo, clname, **opts):
|
|||
except:
|
||||
return "hgpatch: " + ExceptionDetail()
|
||||
|
||||
cmd.stdin.write(patch)
|
||||
cmd.stdin.close()
|
||||
out = cmd.stdout.read()
|
||||
if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
|
||||
out, err = cmd.communicate(patch)
|
||||
if cmd.returncode != 0 and not opts["ignore_hgpatch_failure"]:
|
||||
return "hgpatch failed"
|
||||
cl.local = True
|
||||
cl.files = out.strip().split()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue