summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-06 02:18:08 +0200
committerhut <hut@lavabit.com>2010-05-06 02:18:08 +0200
commitc0175f6d3cba53951ac8468003fd2c8de69bb357 (patch)
tree35d35ecf83b4b0a368262ac632b7d5c7b82fcf8b
parentcaacb5e7effb958b19e8c64a7f394baa5ddc7a03 (diff)
downloadranger-c0175f6d3cba53951ac8468003fd2c8de69bb357.tar.gz
ext.human_readable: round(number, 2)
-rw-r--r--ranger/ext/human_readable.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/ext/human_readable.py b/ranger/ext/human_readable.py
index 1a3d1ec9..beeaf6d3 100644
--- a/ranger/ext/human_readable.py
+++ b/ranger/ext/human_readable.py
@@ -24,7 +24,7 @@ def human_readable(byte, seperator=' '):
 		return '0'
 
 	exponent = int(math.log(byte, 2) / 10)
-	flt = float(byte) / (1 << (10 * exponent))
+	flt = round(float(byte) / (1 << (10 * exponent)), 2)
 
 	if exponent > MAX_EXPONENT:
 		return '>9000' # off scale
s/ranger/commit/ranger.py?h=v1.6.0&id=8fa8705476d5023083bc27a3fddaee8402ac94e5'>8fa87054 ^
06848dc3 ^
240394a4 ^
f027adc0 ^
08f08fb9 ^
654af129 ^
08f08fb9 ^
d8084b41 ^

99400080 ^
08f08fb9 ^

654af129 ^

0da832e8 ^
d8084b41 ^
cba63cf3 ^
b4250dbc ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40