aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-01-27 13:27:10 -0800
committerRuss Cox <rsc@golang.org>2010-01-27 13:27:10 -0800
commitc40c974d33e925d3f1f32a1c708fdb55aadcd764 (patch)
treebcc50e50c43239a409e029f52d14a361418c48c4
parentb81065d07f3ab6036f4bc8e5a1fa58464e16fa15 (diff)
downloadgo-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.py9
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)