mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
remove tray filepath if pid is not running
This commit is contained in:
parent
9c01ddaf63
commit
a4de305fde
1 changed files with 6 additions and 1 deletions
|
|
@ -278,7 +278,12 @@ def remove_tray_server_url(force: Optional[bool] = False):
|
|||
except BaseException:
|
||||
data = {}
|
||||
|
||||
if force or not data or data.get("pid") == os.getpid():
|
||||
if (
|
||||
force
|
||||
or not data
|
||||
or data.get("pid") == os.getpid()
|
||||
or not _is_process_running(data.get("pid"))
|
||||
):
|
||||
os.remove(filepath)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue