From 2e205ecafcd4255669d0c50e5bfd750f2748d890 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 19 Feb 2021 10:23:42 -0500 Subject: [PATCH 1/2] Fix python2ism in doc upload. --- etc/taskcluster/decision_task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 3412b692ce9..a05824cb178 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -8,6 +8,7 @@ import os.path import decisionlib import functools from decisionlib import CONFIG, SHARED +from urllib.request import urlopen def main(task_for): @@ -240,7 +241,7 @@ def upload_docs(): import urllib, json, os root_url = os.environ["TASKCLUSTER_PROXY_URL"] url = root_url + "/api/secrets/v1/secret/project/servo/doc.servo.org" - token = json.load(urllib.urlopen(url))["secret"]["token"] + token = json.load(urlopen(url))["secret"]["token"] open("/root/.git-credentials", "w").write("https://git:%s@github.com/" % token) """) .with_script(""" From 462237db4c2290f4a34045c9efc73347d933b956 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 19 Feb 2021 10:28:15 -0500 Subject: [PATCH 2/2] Fix str/bytes confusion when uploading to s3. --- python/servo/package_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index f44786251cc..2948d6c2409 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -644,7 +644,7 @@ class PackageCommands(CommandBase): break sha256_digest.update(data) package_hash = sha256_digest.hexdigest() - package_hash_fileobj = io.BytesIO(package_hash) + package_hash_fileobj = io.BytesIO(package_hash).encode('utf-8') latest_hash_upload_key = '{}/servo-latest.{}.sha256'.format(nightly_dir, extension) s3.upload_file(package, BUCKET, package_upload_key)