diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-04-22 14:13:52 -0700 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-04-22 14:13:52 -0700 |
commit | 71f37e90ef330f056abe456c93d59cee23765ede (patch) | |
tree | cf0d93d4aa9ef9ddd5ef3637d39965de943fce83 | |
parent | 75b5c590a8470b40f5bba869be09393757182ddf (diff) | |
parent | b0936ef42365ce7f2bd5b49e39d0ed42c4c3684e (diff) |
Merge pull request #797 from AI0867/patch-1
Use standard unit symbols in format_bytes
-rw-r--r-- | youtube_dl/FileDownloader.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index 7139adf6b..100779756 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -121,7 +121,7 @@ class FileDownloader(object): exponent = 0 else: exponent = int(math.log(bytes, 1024.0)) - suffix = 'bkMGTPEZY'[exponent] + suffix = ['B','KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'][exponent] converted = float(bytes) / float(1024 ** exponent) return '%.2f%s' % (converted, suffix) |