Skip to content

Commit

Permalink
Merge pull request pypa#477 from orenhe/develop
Browse files Browse the repository at this point in the history
Adapt unit to SI standards: Kb/Mb -> KB/MB
  • Loading branch information
Carl Meyer committed Mar 13, 2012
2 parents 20b618c + eb096fb commit b072a9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pip/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ def normalize_name(name):

def format_size(bytes):
if bytes > 1000*1000:
return '%.1fMb' % (bytes/1000.0/1000)
return '%.1fMB' % (bytes/1000.0/1000)
elif bytes > 10*1000:
return '%iKb' % (bytes/1000)
return '%iKB' % (bytes/1000)
elif bytes > 1000:
return '%.1fKb' % (bytes/1000.0)
return '%.1fKB' % (bytes/1000.0)
else:
return '%ibytes' % bytes

Expand Down

0 comments on commit b072a9a

Please sign in to comment.