mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
contrib: Use text=True in subprocess over manual encoding handling
All touched Python scripts already assume and require UTF8, so manually specifying encoding or decoding for functions in the subprocess module is redundant to just using text=True, which exists since Python 3.7
This commit is contained in:
@@ -31,7 +31,7 @@ def _get_header_file_lst() -> list[str]:
|
||||
"""
|
||||
git_cmd_lst = ['git', 'ls-files', '--', '*.h']
|
||||
header_file_lst = check_output(
|
||||
git_cmd_lst).decode('utf-8').splitlines()
|
||||
git_cmd_lst, text=True).splitlines()
|
||||
|
||||
header_file_lst = [hf for hf in header_file_lst
|
||||
if not any(ef in hf for ef
|
||||
|
||||
Reference in New Issue
Block a user