Skip to content

Commit

Permalink
Fix #11813 (daca: script crashes (UnicodeDecodeError) when checking p…
Browse files Browse the repository at this point in the history
…ackage lgeneral) (#5217)
  • Loading branch information
danmar committed Jul 4, 2023
1 parent 7ff58da commit 682bdd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/donate_cpu_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
CLIENT_VERSION = "1.3.45"
CLIENT_VERSION = "1.3.46"

# Timeout for analysis with Cppcheck in seconds
CPPCHECK_TIMEOUT = 30 * 60
Expand Down Expand Up @@ -399,9 +399,9 @@ def __run_command(cmd, print_cmd=True):
time_start = time.time()
comm = None
if sys.platform == 'win32':
p = subprocess.Popen(shlex.split(cmd, comments=False, posix=False), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
p = subprocess.Popen(shlex.split(cmd, comments=False, posix=False), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, errors='surrogateescape')
else:
p = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, preexec_fn=os.setsid)
p = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, errors='surrogateescape', preexec_fn=os.setsid)
try:
comm = p.communicate(timeout=CPPCHECK_TIMEOUT)
return_code = p.returncode
Expand Down
1 change: 1 addition & 0 deletions tools/test-my-pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def format_float(a, b=1):
print("No package downloaded")
continue
else:
print('Package: ' + package)
tgz = package

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

0 comments on commit 682bdd3

Please sign in to comment.