From c40c974d33e925d3f1f32a1c708fdb55aadcd764 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 27 Jan 2010 13:27:10 -0800 Subject: [PATCH] dashboard: look for key in $GOROOT before $HOME TBR=agl1 CC=golang-dev https://golang.org/cl/195076 --- misc/dashboard/buildcontrol.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/dashboard/buildcontrol.py b/misc/dashboard/buildcontrol.py index 7851de731dd..b2f7728e973 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)