Skip to content

Commit 1c38945

Browse files
committed
Catch the right exception for issue #71
1 parent d38c3c5 commit 1c38945

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

memory_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def ps_util_tool():
114114
try:
115115
for p in process.children(recursive=True):
116116
mem += getattr(p, meminfo_attr)()[0] / _TWO_20
117-
except os.OSError:
117+
except psutil.NoSuchProcess:
118118
# https://github.com/fabianp/memory_profiler/issues/71
119119
pass
120120
if timestamps:

0 commit comments

Comments
 (0)