summaryrefslogtreecommitdiffstats
path: root/taskcluster/docker/funsize-update-generator
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /taskcluster/docker/funsize-update-generator
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/docker/funsize-update-generator')
-rw-r--r--taskcluster/docker/funsize-update-generator/scripts/funsize.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/taskcluster/docker/funsize-update-generator/scripts/funsize.py b/taskcluster/docker/funsize-update-generator/scripts/funsize.py
index 84fd2fbd0b..0e72da46fc 100644
--- a/taskcluster/docker/funsize-update-generator/scripts/funsize.py
+++ b/taskcluster/docker/funsize-update-generator/scripts/funsize.py
@@ -13,7 +13,6 @@ import shutil
import tempfile
import time
from contextlib import AsyncExitStack
-from distutils.util import strtobool
from pathlib import Path
import aiohttp
@@ -51,6 +50,22 @@ BCJ_OPTIONS = {
}
+def strtobool(value: str):
+ # Copied from `mach.util` since this script runs outside of a mach environment
+ # Reimplementation of distutils.util.strtobool
+ # https://docs.python.org/3.9/distutils/apiref.html#distutils.util.strtobool
+ true_vals = ("y", "yes", "t", "true", "on", "1")
+ false_vals = ("n", "no", "f", "false", "off", "0")
+
+ value = value.lower()
+ if value in true_vals:
+ return 1
+ if value in false_vals:
+ return 0
+
+ raise ValueError(f'Expected one of: {", ".join(true_vals + false_vals)}')
+
+
def verify_signature(mar, cert):
log.info("Checking %s signature", mar)
with open(mar, "rb") as mar_fh: