From 59a6395279e8529b54d96bb84051d38206d63e50 Mon Sep 17 00:00:00 2001 From: Hector Chu Date: Mon, 24 Jan 2011 14:16:24 -0500 Subject: [PATCH] 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 https://golang.org/cl/4025046 --- lib/codereview/codereview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 44279d77a8b..8b9dc81c294 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())