diff --git a/salt/modules/ps.py b/salt/modules/ps.py index f29cf888aa..b00b7bb3ed 100644 --- a/salt/modules/ps.py +++ b/salt/modules/ps.py @@ -133,6 +133,8 @@ def top(num_processes=5, interval=3): try: process = psutil.Process(pid) user, system = process.cpu_times() + except ValueError: + user, system, _, _ = process.cpu_times() except psutil.NoSuchProcess: continue start_usage[process] = user + system @@ -141,6 +143,8 @@ def top(num_processes=5, interval=3): for process, start in six.iteritems(start_usage): try: user, system = process.cpu_times() + except ValueError: + user, system, _, _ = process.cpu_times() except psutil.NoSuchProcess: continue now = user + system