8000 Fix #95: catch OSError when collecting file descriptors. (#205) · inxming/client_python@6625f89 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6625f89

Browse files
blopkerbrian-brazil
authored andcommitted
Fix prometheus#95: catch OSError when collecting file descriptors. (prometheus#205)
1 parent 6abff16 commit 6625f89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prometheus_client/process_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def collect(self):
8383
'Number of open file descriptors.',
8484
len(os.listdir(os.path.join(pid, 'fd'))))
8585
result.extend([open_fds, max_fds])
86-
except IOError:
86+
except (IOError, OSError):
8787
pass
8888

8989
return result

0 commit comments

Comments
 (0)
0