mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
31fae25f68
4a9e36dbaf96f83d0829f8442114a2fa36641776 lint: convert submodule linter test to Python (Eunoia) Pull request description: Refs #24783 ACKs for top commit: laanwj: Tested ACK 4a9e36dbaf96f83d0829f8442114a2fa36641776 Tree-SHA512: ca25b59acf75cebc79588a6c51dc5c313c8d0bd1d492127815d7b81b36aaffd02815a515d97b355582002f71efc33d46435d0b28fce24497bb99799d9ba57228
24 lines
675 B
Python
Executable File
24 lines
675 B
Python
Executable File
#!/usr/bin/env python3
|
|
#
|
|
# Copyright (c) 2022 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'],
|
|
universal_newlines = True, encoding = 'utf8').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()
|