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 | c40c974d33e925d3f1f32a1c708fdb55aadcd764 (patch) | |
tree | bcc50e50c43239a409e029f52d14a361418c48c4 | |
parent | b81065d07f3ab6036f4bc8e5a1fa58464e16fa15 (diff) | |
download | go-c40c974d33e925d3f1f32a1c708fdb55aadcd764.tar.gz go-c40c974d33e925d3f1f32a1c708fdb55aadcd764.zip |
dashboard: look for key in $GOROOT before $HOME
TBR=agl1
CC=golang-dev
https://golang.org/cl/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 7851de731d..b2f7728e97 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) |