Tim,
I do not have a pypi configuration on my server anymore to test this out but I
think what you are asking for is a simple change to webui.py. There is a
pretty_size function that handles this. See the attached.
Joe
Tim Hatch wrote:
Hi,
I'd like to report a minor display nit with the cheeseshop. I hope
this is the right place. In the cheeseshop, filesizes listed in MB
have the numeric portion shown as an integer (rounded down). It
seems to me that it'd be more logical to either round nearest or show
a couple of decimal digits.
For example, the py23 egg in http://pypi.python.org/pypi/Pygments is
listed as "1MB" but is in reality 1,832,489 bytes (1.74MB).
Tim
_______________________________________________
Catalog-SIG mailing list
[email protected]
http://mail.python.org/mailman/listinfo/catalog-sig
Index: webui.py
===================================================================
--- webui.py (revision 524)
+++ webui.py (working copy)
@@ -1572,9 +1572,9 @@
def pretty_size(self, size):
n = 0
while size > 1024:
- size /= 1024
+ size /= 1024.0
n += 1
- return '%d%sB'%(size, ['', 'K', 'M', 'G'][n])
+ return '%f%sB'%(size, ['', 'K', 'M', 'G'][n])
def show_md5(self):
if not self.form.has_key('digest'):
_______________________________________________
Catalog-SIG mailing list
[email protected]
http://mail.python.org/mailman/listinfo/catalog-sig