summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander van Gessel <AI0867@gmail.com>2013-04-21 02:38:37 +0300
committerAlexander van Gessel <AI0867@gmail.com>2013-04-21 02:38:37 +0300
commitb0936ef42365ce7f2bd5b49e39d0ed42c4c3684e (patch)
tree1fe6a2c9cc2705924d9b40b029dd95c06a41fc88
parent41a6eb949a625983c55cdae0c06410392f3a3110 (diff)
downloadyoutube-dl-b0936ef42365ce7f2bd5b49e39d0ed42c4c3684e.tar.gz
youtube-dl-b0936ef42365ce7f2bd5b49e39d0ed42c4c3684e.tar.xz
youtube-dl-b0936ef42365ce7f2bd5b49e39d0ed42c4c3684e.zip
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 9c0c42f8d..19766153c 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)