mirror of https://github.com/golang/go.git
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
This commit is contained in:
parent
5f9a9433ea
commit
50231fa19f
|
|
@ -1762,7 +1762,8 @@ def gofmt(ui, repo, *pats, **opts):
|
||||||
files = ChangedExistingFiles(ui, repo, pats, opts)
|
files = ChangedExistingFiles(ui, repo, pats, opts)
|
||||||
files = gofmt_required(files)
|
files = gofmt_required(files)
|
||||||
if not files:
|
if not files:
|
||||||
return "no modified go files"
|
ui.status("no modified go files\n")
|
||||||
|
return
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
files = [RelativePath(repo.root + '/' + f, cwd) for f in files]
|
files = [RelativePath(repo.root + '/' + f, cwd) for f in files]
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue