Skip to content

Commit cb8236d

Browse files
committed
Merge pull request #401 from yeggor/master
handle exception for psutil.NoSuchProcess along with psutil.AccessDenied
2 parents 025929f + a7d56a5 commit cb8236d

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
@@ -144,7 +144,7 @@ def ps_util_tool():
144144
return mem, time.time()
145145
else:
146146
return mem
147-
except psutil.AccessDenied:
147+
except (psutil.NoSuchProcess, psutil.AccessDenied):
148148
pass
149149
# continue and try to get this from ps
150150

0 commit comments

Comments
 (0)