1 diff -urN gDesklets-0.26.2.orig/libdesklets/Disk.py gDesklets-0.26.2/libdesklets/Disk.py
2 --- gDesklets-0.26.2.orig/libdesklets/Disk.py 2004-08-13 21:56:22.113232392 +0200
3 +++ gDesklets-0.26.2/libdesklets/Disk.py 2004-08-13 21:56:51.983691392 +0200
15 def __poll_size(self, partition):
17 - blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition)[:5]
18 - free = float(bfree * 512)
19 - total = float(blocks * 512)
22 - return (total, used)#, free)
28 + statvfs_data = os.statvfs(partition)
29 + free = float(statvfs_data[statvfs.F_BFREE] * statvfs_data[statvfs.F_FRSIZE])
30 + total = float(statvfs_data[statvfs.F_BLOCKS] * statvfs_data[statvfs.F_FRSIZE])
32 + blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition)
33 + free = float(bfree * 512)
34 + total = float(blocks * 512)
38 + return (total, used)#, free)
41 #:function get_fs | partition | Returns the filesystem for the given