commit c70446c7dff09cba6b9ece2900692dd12954c2cd
parent c76cb6d54843695a5221ea314f399eb9cdc61442
Author: Philipp Hagemeister <phihag@phihag.de>
Date: Mon, 22 Apr 2013 23:15:15 +0200
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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)