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
'Blame the previous revision' href='/elioat/tour/blame/js/quest-log/index.html?id=85b6c948f6fa5e49cc4657e7f8dae9f6ffd9b1e0'>^
8ff754e ^



f1268ab ^

8ff754e ^



f1268ab ^
8ff754e ^


f1268ab ^
8ff754e ^




f1268ab ^
8ff754e ^

f1268ab ^
8ff754e ^

f1268ab ^
8ff754e ^






f1268ab ^













































8ff754e ^


f1268ab ^




8ff754e ^









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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149