diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-09-18 13:54:35 +0200 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2025-09-18 11:17:18 -0600 |
| commit | 2a14f021210fcbc271591d4c592eb4adca6bf127 (patch) | |
| tree | 844e69528a4c4b1d43af1348e6011975e8040c78 /tools/docs/check-variable-fonts.py | |
| parent | 395107a7c91aafef8eb8ffee574b43cc7cce34be (diff) | |
scripts/jobserver-exec: move the code to a class
Convert the code inside jobserver-exec to a class and
properly document it.
Using a class allows reusing the jobserver logic on other
scripts.
While the main code remains unchanged, being compatible with
Python 2.6 and 3.0+, its coding style now follows a more
modern standard, having tabs replaced by a 4-spaces
indent, passing autopep8, black and pylint.
The code allows using a pythonic way to enter/exit a python
code, e.g. it now supports:
with JobserverExec() as jobserver:
jobserver.run(sys.argv[1:])
With the new code, the __exit__() function should ensure
that the jobserver slot will be closed at the end, even if
something bad happens somewhere.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <4749921b75d4e0bd85a25d4d94aa2c940fad084e.1758196090.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'tools/docs/check-variable-fonts.py')
0 files changed, 0 insertions, 0 deletions
