aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-04-22 23:15:15 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-04-22 23:15:15 +0200
commitc70446c7dff09cba6b9ece2900692dd12954c2cd (patch)
tree9cbbd393c5694c9cd07e2c5f65c5977164c85ac3 /youtube_dl
parentc76cb6d54843695a5221ea314f399eb9cdc61442 (diff)
parent71f37e90ef330f056abe456c93d59cee23765ede (diff)
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'youtube_dl')
-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)