Fallback to docker-worker’s URL when $TASKCLUSTER_PROXY_URL is missing

This commit is contained in:
Simon Sapin 2019-05-06 16:00:47 +02:00
parent af077f8cf7
commit 599c015b23

View file

@ -546,7 +546,11 @@ class PackageCommands(CommandBase):
import boto3
def get_taskcluster_secret(name):
url = os.environ["TASKCLUSTER_PROXY_URL"] + "/secrets/v1/secret/project/servo/" + name
url = (
os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster") +
"/secrets/v1/secret/project/servo/" +
name
)
return json.load(urllib.urlopen(url))["secret"]
def get_s3_secret():