Merge branch 'master' of github.com:rg3/youtube-dl
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 22 Apr 2013 21:15:15 +0000 (23:15 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 22 Apr 2013 21:15:15 +0000 (23:15 +0200)
youtube_dl/FileDownloader.py

index 7139adf6bb6490b31dc3661b0fc220df30b0dad2..100779756d956033ace52742d9be3ef13b821323 100644 (file)
@@ -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)