Skip to content

Commit 682bdd3

Browse files
authored
Fix #11813 (daca: script crashes (UnicodeDecodeError) when checking package lgeneral) (#5217)
1 parent 7ff58da commit 682bdd3

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

tools/donate_cpu_lib.py

Lines changed: 3 additions & 3 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.45"
18+
CLIENT_VERSION = "1.3.46"
1919

2020
# Timeout for analysis with Cppcheck in seconds
2121
CPPCHECK_TIMEOUT = 30 * 60
@@ -399,9 +399,9 @@ def __run_command(cmd, print_cmd=True):
399399
time_start = time.time()
400400
comm = None
401401
if sys.platform == 'win32':
402-
p = subprocess.Popen(shlex.split(cmd, comments=False, posix=False), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
402+
p = subprocess.Popen(shlex.split(cmd, comments=False, posix=False), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, errors='surrogateescape')
403403
else:
404-
p = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, preexec_fn=os.setsid)
404+
p = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, errors='surrogateescape', preexec_fn=os.setsid)
405405
try:
406406
comm = p.communicate(timeout=CPPCHECK_TIMEOUT)
407407
return_code = p.returncode

tools/test-my-pr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def format_float(a, b=1):
138138
print("No package downloaded")
139139
continue
140140
else:
141+
print('Package: ' + package)
141142
tgz = package
142143

143144
source_path, source_found = lib.unpack_package(work_path, tgz, c_only=args.c_only, cpp_only=args.cpp_only)

0 commit comments

Comments
 (0)