From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- taskcluster/mach_commands.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'taskcluster/mach_commands.py') 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 " -- cgit v1.2.3