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:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (c) 2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2022-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -13,7 +13,7 @@ import sys
|
||||
|
||||
def main():
|
||||
submodules_list = subprocess.check_output(['git', 'submodule', 'status', '--recursive'],
|
||||
text = True, encoding = 'utf8').rstrip('\n')
|
||||
text = True).rstrip('\n')
|
||||
if submodules_list:
|
||||
print("These submodules were found, delete them:\n", submodules_list)
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user