1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-04 23:52:56 +08:00

Floor instead of round in format_percent

This commit is contained in:
rzhxeo 2014-02-21 00:23:17 +01:00
parent eae16eb67b
commit d30c3806bb

View File

@ -70,7 +70,7 @@ class FileDownloader(object):
def format_percent(percent):
if percent is None:
return '---.-%'
return '%6s' % ('%3.1f%%' % percent)
return '%3s.%.1s%%' % tuple(str(float(percent)).split('.'))
@staticmethod
def calc_eta(start, now, total, current):