Skip to content

Commit 20ff2d7

Browse files
authored
donate_cpu_lib.py: use subprocess.check_call() so failed calls will actually raise an exception (#4750)
1 parent d06f93a commit 20ff2d7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tools/donate_cpu_lib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
1616
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
1717
# changes)
18-
CLIENT_VERSION = "1.3.43"
18+
CLIENT_VERSION = "1.3.44"
1919

2020
# Timeout for analysis with Cppcheck in seconds
2121
CPPCHECK_TIMEOUT = 30 * 60
@@ -37,7 +37,7 @@ def detect_make():
3737
for m in make_cmds:
3838
try:
3939
#print('{} --version'.format(m))
40-
subprocess.call([m, '--version'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
40+
subprocess.check_call([m, '--version'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
4141
except OSError as e:
4242
#print("'{}' not found ({})".format(m, e))
4343
continue
@@ -65,7 +65,7 @@ def check_requirements():
6565
for app in apps:
6666
try:
6767
#print('{} --version'.format(app))
68-
subprocess.call([app, '--version'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
68+
subprocess.check_call([app, '--version'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
6969
except OSError:
7070
print("Error: '{}' is required".format(app))
7171
result = False
@@ -191,7 +191,7 @@ def compile_version(cppcheck_path):
191191
else:
192192
exclude_bin = 'cppcheck'
193193
# TODO: how to support multiple compilers on the same machine? this will clean msbuild.exe files in a mingw32-make build and vice versa
194-
subprocess.call(['git', 'clean', '-f', '-d', '-x', '--exclude', exclude_bin], cwd=cppcheck_path)
194+
subprocess.check_call(['git', 'clean', '-f', '-d', '-x', '--exclude', exclude_bin], cwd=cppcheck_path)
195195
return ret
196196

197197

0 commit comments

Comments
 (0)