aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-04-22 14:13:52 -0700
committerPhilipp Hagemeister <phihag@phihag.de>2013-04-22 14:13:52 -0700
commit71f37e90ef330f056abe456c93d59cee23765ede (patch)
treecf0d93d4aa9ef9ddd5ef3637d39965de943fce83
parent75b5c590a8470b40f5bba869be09393757182ddf (diff)
parentb0936ef42365ce7f2bd5b49e39d0ed42c4c3684e (diff)
Merge pull request #797 from AI0867/patch-1
Use standard unit symbols in format_bytes
-rw-r--r--youtube_dl/FileDownloader.py2
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)