summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-12-03 17:23:11 -0800
committerRuss Cox <rsc@golang.org>2009-12-03 17:23:11 -0800
commitcf5fc7ed8e5fa61f625d2e6f6af07002ae0a522e (patch)
tree015f19e644cb22165433f89ec20c3a6e10459fe1 /lib
parent2dbb822f2200ff3a981f7c1a73bc482b07728030 (diff)
downloadgo-cf5fc7ed8e5fa61f625d2e6f6af07002ae0a522e.tar.gz
codereview: do not gofmt deleted files
R=r http://codereview.appspot.com/164083
Diffstat (limited to 'lib')
-rw-r--r--lib/codereview/codereview.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index 5daad8ee7..fa535d634 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -622,6 +622,7 @@ def CheckGofmt(ui, repo, files, just_warn=False):
return
cwd = os.getcwd()
files = [RelativePath(repo.root + '/' + f, cwd) for f in files]
+ files = [f for f in files if os.access(f, 0)]
try:
cmd = subprocess.Popen(["gofmt", "-l"] + files, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
cmd.stdin.close()