diff --git a/src/tribler-core/tribler_core/utilities/process_checker.py b/src/tribler-core/tribler_core/utilities/process_checker.py index 2ef1e5bd59f..f38ae68d04d 100644 --- a/src/tribler-core/tribler_core/utilities/process_checker.py +++ b/src/tribler-core/tribler_core/utilities/process_checker.py @@ -11,7 +11,7 @@ class ProcessChecker: This class contains code to check whether a Tribler process is already running. """ - def __init__(self, state_directory): + def __init__(self, state_directory: Path): self.state_directory = state_directory self.lock_file_path = self.state_directory / LOCK_FILE_NAME @@ -58,7 +58,7 @@ def remove_lock_file(self): Remove the lock file if it exists. """ if self.lock_file_path.exists(): - self.lock_file_path.unlink() + self.lock_file_path.unlink(missing_ok=True) def get_pid_from_lock_file(self): """