Skip to content

Commit cda7b38

Browse files
authored
Merge pull request #4757 from bruntib/fix_server_instance
[fix] Can't list server instances at PyPI installation
2 parents 31843a4 + 9655278 commit cda7b38

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

web/server/codechecker_server/instance_manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,11 @@ def __check_instance(hostname, pid):
5555
try:
5656
proc = psutil.Process(pid)
5757

58+
# When CodeChecker is installed via PyPI, then the script name is
59+
# "CodeChecker" and it's "codechecker_common/cli.py" when run from
60+
# local build.
5861
cli = os.path.join("codechecker_common", "cli.py")
59-
return cli in proc.cmdline()[1] and \
62+
return proc.cmdline()[1].endswith((cli, 'CodeChecker')) and \
6063
proc.username() == getpass.getuser()
6164
except psutil.NoSuchProcess:
6265
# If the process does not exist, it cannot be valid.

0 commit comments

Comments
 (0)