--- a/docs/HISTORY.txt Sun Apr 21 11:22:41 2013 +0200
+++ b/docs/HISTORY.txt Sun Apr 21 11:24:24 2013 +0200
@@ -1,6 +1,10 @@
Changelog
=========
+0.4.2
+-----
+ - small correction in getHumanSize() function
+
0.4.1
-----
- use request locale formatter in getHumanSize function
--- a/src/ztfy/utils/size.py Sun Apr 21 11:22:41 2013 +0200
+++ b/src/ztfy/utils/size.py Sun Apr 21 11:24:24 2013 +0200
@@ -33,10 +33,10 @@
"""Convert given bytes value in human readable format"""
if request is None:
request = queryRequest()
- if request is not None:
- formatter = request.locale.numbers.getFormatter('decimal')
- else:
- formatter = None
+ if request is not None:
+ formatter = request.locale.numbers.getFormatter('decimal')
+ else:
+ formatter = None
if value < 1024:
return translate(_("%d bytes"), context=request) % value
value = value / 1024.0