equal
deleted
inserted
replaced
76 for unit, limit in unit_limit: |
76 for unit, limit in unit_limit: |
77 if size >= limit: |
77 if size >= limit: |
78 if unit != 'b': |
78 if unit != 'b': |
79 return '%.2f%s' % (size / float(limit), unit) |
79 return '%.2f%s' % (size / float(limit), unit) |
80 else: |
80 else: |
81 return '%u%s' % (size / limit, unit) |
81 return '%ub' % size |
82 |
82 |
83 |
83 |
84 def size_in_bytes(size): |
84 def size_in_bytes(size): |
85 """Converts the string `size` to a long (size in bytes). |
85 """Converts the string `size` to a long (size in bytes). |
86 |
86 |