Skip to content

Commit b016e51

Browse files
committed
Fix pidfile not found error
1 parent 8f3ddae commit b016e51

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: pgactivity/data.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,12 @@ def pg_is_local_access(self) -> bool:
164164
try:
165165
with open(pid_file, "r") as fd:
166166
pid = fd.readline().strip()
167-
except PermissionError:
168-
logger.info("Access Denied to the pidfile. System counters are disabled.")
167+
except OSError as e:
168+
logger.info(
169+
"pidfile %s could not be read: %s. System counters are disabled.",
170+
pid_file,
171+
e,
172+
)
169173
return False
170174

171175
try:

0 commit comments

Comments
 (0)