Bug 1196253 - update in-tree psutil to 3.1.1. r=gps

This commit is contained in:
Joel Maher
2015-08-20 08:03:31 -04:00
parent e27f1455ab
commit 6fabf5a7a3
73 changed files with 6544 additions and 3863 deletions

View File

@@ -30,14 +30,15 @@ PID USER DISK READ DISK WRITE COMMAND
Author: Giampaolo Rodola' <g.rodola@gmail.com>
"""
import os
import sys
import psutil
if not hasattr(psutil.Process, 'io_counters') or os.name != 'posix':
sys.exit('platform not supported')
import time
import curses
import atexit
import time
import sys
try:
import curses
except ImportError:
sys.exit('platform not supported')
import psutil
# --- curses stuff
@@ -116,7 +117,7 @@ def poll(interval):
if not p._cmdline:
p._cmdline = p.name()
p._username = p.username()
except psutil.NoSuchProcess:
except (psutil.NoSuchProcess, psutil.ZombieProcess):
procs.remove(p)
disks_after = psutil.disk_io_counters()
@@ -167,7 +168,7 @@ def refresh_window(procs, disks_read, disks_write):
def main():
try:
interval = 0
while 1:
while True:
args = poll(interval)
refresh_window(*args)
interval = 1