summaryrefslogtreecommitdiff
path: root/lib/codereview/codereview.py
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-03-26 17:32:22 -0700
committerRob Pike <r@golang.org>2013-03-26 17:32:22 -0700
commit32bd5db2dd2363f654f2a5da91336ba65c5a2591 (patch)
treefc4bdc81edf48568f7792e585586fdbf52a36b19 /lib/codereview/codereview.py
parente0f01c446197f1091418500564c37aae998cd85e (diff)
downloadgo-32bd5db2dd2363f654f2a5da91336ba65c5a2591.tar.gz
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://codereview.appspot.com/7917044
Diffstat (limited to 'lib/codereview/codereview.py')
-rw-r--r--lib/codereview/codereview.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index 11766fcb2..f839263c5 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -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: