Backed out changesets 1ad8a6674785 and ed0b6a11532d (bug 908296) for OSX mach bustage.

This commit is contained in:
Ryan VanderMeulen
2013-08-23 12:18:18 -04:00
parent ecf8544428
commit 780f238c46
54 changed files with 671 additions and 3203 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -9,7 +9,6 @@ List all mounted disk partitions a-la "df -h" command.
"""
import sys
import os
import psutil
from psutil._compat import print_
@@ -34,9 +33,6 @@ def main():
templ = "%-17s %8s %8s %8s %5s%% %9s %s"
print_(templ % ("Device", "Total", "Used", "Free", "Use ", "Type", "Mount"))
for part in psutil.disk_partitions(all=False):
if os.name == 'nt' and 'cdrom' in part.opts:
# may raise ENOENT if there's no cd-rom in the drive
continue
usage = psutil.disk_usage(part.mountpoint)
print_(templ % (part.device,
bytes2human(usage.total),