blob: ebe0b29060d1752237bd23fdcf6a7ab3189aa882 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Fix the alternative path of jack_functions.df():
- close p after reading from it, not before...
- get rid of 'keep_free' which is no defined. It's really cf['_keep_free']
but it should not be there anyway since the code which calls
jack_functions.df() will deduct it.
- also close p when 'Available' is not found (unlikely, but still...)
Debian #324946.
--- a/jack_functions.py~ 2005-11-01 21:06:30.000000000 +0000
+++ b/jack_functions.py 2005-11-01 21:14:33.000000000 +0000
@@ -53,9 +53,10 @@
s = string.split(string.rstrip(p.readline()))
for i in range(len(s)):
if s[i] == "Available":
- p.close()
s = string.split(string.rstrip(p.readline()))
- return int(s[i]) * long(blocksize) - long(keep_free)
+ p.close()
+ return int(s[i]) * long(blocksize)
+ p.close()
def get_sysload_linux_proc():
"extract sysload from /proc/loadavg, linux only (?)"
|