summaryrefslogtreecommitdiffstats
path: root/taskcluster/mach_commands.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /taskcluster/mach_commands.py
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/mach_commands.py')
-rw-r--r--taskcluster/mach_commands.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/taskcluster/mach_commands.py b/taskcluster/mach_commands.py
index 78099f6eea..73e77fce66 100644
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -17,23 +17,11 @@ from functools import partial
import gecko_taskgraph.main
from gecko_taskgraph.main import commands as taskgraph_commands
from mach.decorators import Command, CommandArgument, SubCommand
+from mach.util import strtobool
logger = logging.getLogger("taskcluster")
-def strtobool(value):
- """Convert string to boolean.
-
- Wraps "distutils.util.strtobool", deferring the import of the package
- in case it's not installed. Otherwise, we have a "chicken and egg problem" where
- |mach bootstrap| would install the required package to enable "distutils.util", but
- it can't because mach fails to interpret this file.
- """
- from distutils.util import strtobool
-
- return bool(strtobool(value))
-
-
def get_taskgraph_command_parser(name):
"""Given a command name, obtain its argument parser.
@@ -59,7 +47,7 @@ def get_taskgraph_decision_parser():
(
["--optimize-target-tasks"],
{
- "type": lambda flag: strtobool(flag),
+ "type": lambda flag: bool(strtobool(flag)),
"nargs": "?",
"const": "true",
"help": "If specified, this indicates whether the target "