Merge pull request #187 from EdwardBetts/patch-1

Indeed. Thanks :-)
This commit is contained in:
Richard Larkin 2016-05-26 22:42:39 +02:00
commit 006359205a

View file

@ -398,10 +398,10 @@ class Recipe(object):
return return
def report_hook(index, blksize, size): def report_hook(index, blksize, size):
if size <= 0: if size <= 0:
progression = '{0} bytes'.format(index * blksize) progression = '{} bytes'.format(index * blksize)
else: else:
progression = '{0:.2f}%'.format( progression = '{:.2%}'.format(
index * blksize * 100. / float(size)) index * blksize / float(size))
stdout.write('- Download {}\r'.format(progression)) stdout.write('- Download {}\r'.format(progression))
stdout.flush() stdout.flush()