Bug 1826846 [wpt PR 39416] - [wpt-lint] Handle `FileNotFoundError` when `git` is...
commit3ef51a56a0092a1d4bd89e8bb104afd146b0fefb
authorJonathan Lee <jonathan-j-lee@users.noreply.github.com>
Thu, 13 Apr 2023 04:34:00 +0000 (13 04:34 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 14 Apr 2023 11:16:09 +0000 (14 11:16 +0000)
tree98d6180e5108e4a3b3947d54369182a84ce0b482
parent88959264bba478a659b7b644c961b9db3aea57be
Bug 1826846 [wpt PR 39416] - [wpt-lint] Handle `FileNotFoundError` when `git` is not found, a=testonly

Automatic update from web-platform-tests
[wpt-lint] Handle `FileNotFoundError` when `git` is not found (#39416)

`tools.lint.lint` is unimportable when `git` does not exist in the
`PATH`:

```
  File "C:\b\s\w\ir\third_party\blink\tools\blinkpy\tool\commands\lint_wpt.py", line 16, in <module>
    from tools.lint import lint as wptlint
  File "C:\b\s\w\ir\third_party\wpt_tools\wpt\tools\lint\__init__.py", line 1, in <module>
    from . import lint  # noqa: F401
  File "C:\b\s\w\ir\third_party\wpt_tools\wpt\tools\lint\lint.py", line 1135, in <module>
    subprocess.check_output(["git", "--version"])
  ...
  File "C:\b\s\w\ir\.task_template_vpython_cache\vpython\store\cpython-e6tenrlsesftvg6k08ajgkk7b4\contents\bin\Lib\subprocess.py", line 1311, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
```
--

wpt-commits: ad20c1eddfac807ce1188dd6e0bb345f060aca43
wpt-pr: 39416
testing/web-platform/tests/tools/lint/lint.py