mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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
24 lines
650 B
Python
Executable File
24 lines
650 B
Python
Executable File
#!/usr/bin/env python3
|
|
#
|
|
# 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.
|
|
|
|
"""
|
|
This script checks for git modules
|
|
"""
|
|
|
|
import subprocess
|
|
import sys
|
|
|
|
def main():
|
|
submodules_list = subprocess.check_output(['git', 'submodule', 'status', '--recursive'],
|
|
text = True).rstrip('\n')
|
|
if submodules_list:
|
|
print("These submodules were found, delete them:\n", submodules_list)
|
|
sys.exit(1)
|
|
sys.exit(0)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|