Commit 50231fa1 authored by Rob Pike's avatar Rob Pike

lib/codereview/codereview.py: fix crash when hg gofmt has no files

The gofmt function was returning a string, which isn't the right type.
Three cheers for dynamic typing.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7917044
parent 5f9a9433
......@@ -1762,7 +1762,8 @@ def gofmt(ui, repo, *pats, **opts):
files = ChangedExistingFiles(ui, repo, pats, opts)
files = gofmt_required(files)
if not files:
return "no modified go files"
ui.status("no modified go files\n")
return
cwd = os.getcwd()
files = [RelativePath(repo.root + '/' + f, cwd) for f in files]
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment