From e27d7c3816ddb0f6daaba7abfa08fff2948ada76 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Wed, 17 May 2023 13:04:38 +0000 Subject: [PATCH] Drop support for py2 presubmit hook win mapping We no longer support py2 so we shouldn't have a special handling for py2 hooks. R=gavinmak@google.com Change-Id: I038f462a4991d17bedb3e02104374b3ad1ffa5ff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4541664 Commit-Queue: Gavin Mak Reviewed-by: Gavin Mak Auto-Submit: Josip Sokcevic --- gclient.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gclient.py b/gclient.py index 8ca899caa..3a9c5c64a 100755 --- a/gclient.py +++ b/gclient.py @@ -247,9 +247,7 @@ class Hook(object): cmd = list(self._action) - if cmd[0] == 'python': - cmd[0] = 'vpython' - if (cmd[0] in ['vpython', 'vpython3']) and _detect_host_os() == 'win': + if cmd[0] == 'vpython3' and _detect_host_os() == 'win': cmd[0] += '.bat' exit_code = 2