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

@@ -18,7 +18,6 @@ Device Total Used Free Use % Type Mount
import sys
import os
import psutil
from psutil._compat import print_
def bytes2human(n):
@@ -40,8 +39,8 @@ def bytes2human(n):
def main():
templ = "%-17s %8s %8s %8s %5s%% %9s %s"
print_(templ % ("Device", "Total", "Used", "Free", "Use ", "Type",
"Mount"))
print(templ % ("Device", "Total", "Used", "Free", "Use ", "Type",
"Mount"))
for part in psutil.disk_partitions(all=False):
if os.name == 'nt':
if 'cdrom' in part.opts or part.fstype == '':
@@ -50,7 +49,7 @@ def main():
# partition or just hang.
continue
usage = psutil.disk_usage(part.mountpoint)
print_(templ % (
print(templ % (
part.device,
bytes2human(usage.total),
bytes2human(usage.used),