Reland "Drop support for py2 presubmit hook win mapping"

This is a reland of commit e27d7c3816

Original change's description:
> 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 <gavinmak@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>

Change-Id: I190fb7c1ee4e76adfe74196c1ed579a424314a02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4669591
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/91/4669591/2
Josip Sokcevic 2 years ago committed by LUCI CQ
parent 247429efd9
commit 9d18c9eb65

@ -247,9 +247,7 @@ class Hook(object):
cmd = list(self._action) cmd = list(self._action)
if cmd[0] == 'python': if cmd[0] == 'vpython3' and _detect_host_os() == 'win':
cmd[0] = 'vpython'
if (cmd[0] in ['vpython', 'vpython3']) and _detect_host_os() == 'win':
cmd[0] += '.bat' cmd[0] += '.bat'
exit_code = 2 exit_code = 2

Loading…
Cancel
Save