mirror of
https://github.com/golang/go.git
synced 2025-11-09 13:11:03 +00:00
codereview: avoid crash if no config
Fixes #959. R=r CC=golang-dev https://golang.org/cl/1876045
This commit is contained in:
parent
b49561d884
commit
bbf925aa56
1 changed files with 5 additions and 1 deletions
|
|
@ -1632,7 +1632,11 @@ def RietveldSetup(ui, repo):
|
||||||
if line.startswith('defaultcc: '):
|
if line.startswith('defaultcc: '):
|
||||||
defaultcc = SplitCommaSpace(line[10:])
|
defaultcc = SplitCommaSpace(line[10:])
|
||||||
except:
|
except:
|
||||||
pass
|
# If there are no options, chances are good this is not
|
||||||
|
# a code review repository; stop now before we foul
|
||||||
|
# things up even worse. Might also be that repo doesn't
|
||||||
|
# even have a root. See issue 959.
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = open(repo.root + '/CONTRIBUTORS', 'r')
|
f = open(repo.root + '/CONTRIBUTORS', 'r')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue