aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/FileDownloader.py
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 /youtube_dl/FileDownloader.py
parent41a6eb949a625983c55cdae0c06410392f3a3110 (diff)
Use standard unit symbols in format_bytes
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-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)