Commit d2c813e1 authored by Jason Madden's avatar Jason Madden

cross-platform number_open_files for windows.

parent b0aa4e3c
...@@ -707,7 +707,11 @@ else: ...@@ -707,7 +707,11 @@ else:
def get_number_open_files(): def get_number_open_files():
process = psutil.Process() process = psutil.Process()
return process.num_fds() try:
return process.num_fds()
except AttributeError:
# num_fds is unix only. Is num_handles close enough on Windows?
return 0
if PYPY: if PYPY:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment