Skip to content

Commit 25b0aad

Browse files
committed
[#17] The second attempt to fix the problem
1 parent f6dbc66 commit 25b0aad

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/service/services_info_service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Optional
33

44
import psutil
5-
from psutil import STATUS_STOPPED, NoSuchProcess
5+
from psutil import STATUS_STOPPED, NoSuchProcess, ZombieProcess, AccessDenied
66
from psutil._pswindows import WindowsService
77

88
from constants.any import LOG
@@ -12,12 +12,12 @@
1212
# Fix bug of psutil
1313
WindowsService.description = suppress_exception(
1414
WindowsService.description,
15-
(FileNotFoundError,),
15+
(FileNotFoundError, ZombieProcess, AccessDenied, OSError),
1616
lambda: ""
1717
)
1818
WindowsService._query_config = suppress_exception(
1919
WindowsService._query_config,
20-
(FileNotFoundError,),
20+
(FileNotFoundError, ZombieProcess, AccessDenied, OSError),
2121
lambda: dict(display_name="", binpath="", username="", start_type="")
2222
)
2323

0 commit comments

Comments
 (0)