diff --git a/memory_profiler.py b/memory_profiler.py index f0b52cd..de12396 100644 --- a/memory_profiler.py +++ b/memory_profiler.py @@ -144,7 +144,7 @@ def ps_util_tool(): return mem, time.time() else: return mem - except psutil.AccessDenied: + except (psutil.NoSuchProcess, psutil.AccessDenied): pass # continue and try to get this from ps