Skip to content

Commit

Permalink
donate_cpu_lib.py: fixed use-maxsplit-arg and `unnecessary-negation…
Browse files Browse the repository at this point in the history
…` pylint findings
  • Loading branch information
firewave committed Dec 6, 2024
1 parent b067eab commit 8c780d0
Showing 1 changed file with 3 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 @@ -544,7 +544,7 @@ def scan_package(cppcheck_path, source_path, libraries, capture_callstack=True,
cmd += dir_to_scan
_, st_stdout, _, _ = __run_command(cmd)
gdb_pos = st_stdout.find(" received signal")
if not gdb_pos == -1:
if gdb_pos != -1:
last_check_pos = st_stdout.rfind('Checking ', 0, gdb_pos)
if last_check_pos == -1:
stacktrace = st_stdout[gdb_pos:]
Expand Down Expand Up @@ -764,10 +764,10 @@ def has_include(filedata):
def get_compiler_version():
if __make_cmd == 'msbuild.exe':
_, _, stderr, _ = __run_command('cl.exe', False)
return stderr.split('\n')[0]
return stderr.split('\n', maxsplit=1)[0]

_, stdout, _, _ = __run_command('g++ --version', False)
return stdout.split('\n')[0]
return stdout.split('\n', maxsplit=1)[0]


def get_client_version():
Expand Down

0 comments on commit 8c780d0

Please sign in to comment.