From 4ad686bbd77a395e5001c59fa961335c38c171b7 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 20 May 2012 12:42:45 +0200 Subject: [PATCH] was not fixed, maybe now.. --- disk_mon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/disk_mon.py b/disk_mon.py index 5f5d57a..bcdf00d 100755 --- a/disk_mon.py +++ b/disk_mon.py @@ -40,7 +40,8 @@ class diskmon(object): try: self.part[2] except IndexError: - self.part.append("not mounted") + for range(4): + self.part.append("not mounted") self.mtab.close() @@ -54,7 +55,7 @@ if __name__ == "__main__": diskmoninstance.gather() #print diskmoninstance.partitions for partition in diskmoninstance.partitions: - print "device:\t\t" + str(partition[0]) + "\nuuid:\t\t" + str(partition[1]) + "\nmountpoint:\t" + str(partition[2]) + "\nfilesystem:\t" + str(partition[3]) + "\nblocksize:\t" + str(partition[4]) + "\ntotal blocks:\t" + str(partition[5]) + "\nfree blocks:\t" + str(partition[6]) + print "device:\t\t" + str(partition[0]) + "\nuuid:\t\t" + str(partition[1]) + "\nmountpoint:\t" + str(partition[2]) + "\nfilesystem:\t" + str(partition[3]) + "\nblocksize:\t" + str(partition[4]) + "\ntotal blocks:\t" + str(partition[5]) + "\nfree blocks:\t" + str(partition[6]) + "\n"