Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Unified Diff: Lib/shutil.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/runpy.py ('k') | Lib/smtplib.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/shutil.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/shutil.py Mon Jul 25 09:47:18 2011 -0400
@@ -12,7 +12,6 @@
import collections
import errno
import tarfile
-from collections import namedtuple
try:
import bz2
@@ -755,21 +754,3 @@
func = _UNPACK_FORMATS[format][1]
kwargs = dict(_UNPACK_FORMATS[format][2])
func(filename, extract_dir, **kwargs)
-
-if hasattr(os, "statvfs") or os.name == 'nt':
- _ntuple_diskusage = namedtuple('usage', 'total used free')
-
- def disk_usage(path):
- """Return disk usage statistics about the given path as a namedtuple
- including total, used and free space expressed in bytes.
- """
- if hasattr(os, "statvfs"):
- st = os.statvfs(path)
- free = (st.f_bavail * st.f_frsize)
- total = (st.f_blocks * st.f_frsize)
- used = (st.f_blocks - st.f_bfree) * st.f_frsize
- else:
- import nt
- total, free = nt._getdiskusage(path)
- used = total - free
- return _ntuple_diskusage(total, used, free)
« no previous file with comments | « Lib/runpy.py ('k') | Lib/smtplib.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+