In dev mode, when checking for existing onionshare, check for processes that start with python3 as well as python

This commit is contained in:
Micah Lee 2020-04-06 19:53:34 -07:00
parent c07eda330d
commit 49fb1b334b
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -138,7 +138,11 @@ def main():
# Dev mode onionshare?
if proc.info["cmdline"] and len(proc.info["cmdline"]) >= 2:
if (
os.path.basename(proc.info["cmdline"][0]).lower() == "python"
(
os.path.basename(proc.info["cmdline"][0]).lower() == "python"
or os.path.basename(proc.info["cmdline"][0]).lower()
== "python3"
)
and os.path.basename(proc.info["cmdline"][1]) == "onionshare-gui"
and proc.status() != "zombie"
):