summaryrefslogtreecommitdiff
path: root/lib/codereview
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2011-02-08 22:30:06 -0500
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2011-02-08 22:30:06 -0500
commit756cb9d33b728abd89e0196a1b1ec72a602e8d32 (patch)
treeda754d8684799f066e845f0d45ff3346d33d8a74 /lib/codereview
parent2f56ca168278dfec94bc1d26054732c439b40fe7 (diff)
downloadgo-756cb9d33b728abd89e0196a1b1ec72a602e8d32.tar.gz
codereview: use cmd.communicate.
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/4145046 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'lib/codereview')
-rw-r--r--lib/codereview/codereview.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index 94270f840..96efc855b 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -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()