summaryrefslogtreecommitdiff
path: root/lib/codereview
diff options
context:
space:
mode:
authorHector Chu <hectorchu@gmail.com>2011-01-24 14:16:24 -0500
committerHector Chu <hectorchu@gmail.com>2011-01-24 14:16:24 -0500
commite7dc17d2814c49060b26ba62db8683cd1ca9ff81 (patch)
tree6f682dc92c2f51519433d4f7b03b8b25edc7bc18 /lib/codereview
parent258a502cd91647a26631bae6d188fdadb3ea18e7 (diff)
downloadgo-e7dc17d2814c49060b26ba62db8683cd1ca9ff81.tar.gz
codereview: fix windows
Uploading go files on Windows aborts with gofmt: exceptions.ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr R=rsc, mattn, Joe Poirier CC=golang-dev http://codereview.appspot.com/4025046 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'lib/codereview')
-rw-r--r--lib/codereview/codereview.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index 44279d77a..8b9dc81c2 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -911,7 +911,7 @@ def CheckGofmt(ui, repo, files, just_warn):
if not files:
return
try:
- cmd = subprocess.Popen(["gofmt", "-l"] + files, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
+ cmd = subprocess.Popen(["gofmt", "-l"] + files, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=sys.platform != "win32")
cmd.stdin.close()
except:
raise util.Abort("gofmt: " + ExceptionDetail())