diff options
author | Russ Cox <rsc@golang.org> | 2010-01-27 13:27:10 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-01-27 13:27:10 -0800 |
commit | 66ac4b2901abbb5b9843d84c5498d28ca295c9e8 (patch) | |
tree | 18548e13f965c15840c1d3792708f9fb906efa59 | |
parent | b48b7814baaeddf999e612bd1cc4ddf318383674 (diff) | |
download | golang-66ac4b2901abbb5b9843d84c5498d28ca295c9e8.tar.gz |
dashboard: look for key in $GOROOT before $HOME
TBR=agl1
CC=golang-dev
http://codereview.appspot.com/195076
-rw-r--r-- | misc/dashboard/buildcontrol.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/misc/dashboard/buildcontrol.py b/misc/dashboard/buildcontrol.py index 7851de731..b2f7728e9 100644 --- a/misc/dashboard/buildcontrol.py +++ b/misc/dashboard/buildcontrol.py @@ -35,10 +35,13 @@ def main(args): buildport = int(os.environ['BUILDPORT']) try: - buildkey = file('%s/.gobuildkey' % os.environ['HOME'], 'r').read().strip() + buildkey = file('%s/.gobuildkey' % os.environ['GOROOT'], 'r').read().strip() except IOError: - print >>sys.stderr, "Need key in ~/.gobuildkey" - return + try: + buildkey = file('%s/.gobuildkey' % os.environ['HOME'], 'r').read().strip() + except IOError: + print >>sys.stderr, "Need key in $GOROOT/.gobuildkey or ~/.gobuildkey" + return if args[1] == 'init': return doInit(args) |