From f084e1303ec28625e93bcda4bafb3bb8e7e67be0 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 20 May 2012 15:38:55 +0200 Subject: [PATCH] nicer output for diskmon --- disk_mon.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/disk_mon.py b/disk_mon.py index 580b853..a7f49af 100755 --- a/disk_mon.py +++ b/disk_mon.py @@ -48,9 +48,14 @@ class diskmon(object): if __name__ == "__main__": diskmoninstance = diskmon() for partition in diskmoninstance.partitions: - print "device:\t\t" + str(partition["device"]) + "\nuuid:\t\t" + str(partition["uuid"]) + print "device:\t\t" + str(partition["device"]) + \ + "\nuuid:\t\t" + str(partition["uuid"]) if partition.has_key("mountpoint"): - print "mountpoint:\t" + str(partition["mountpoint"]) + "\nfilesystem:\t" + str(partition["filesystem"]) + "\nblocksize:\t" + str(partition["blocksize"]) + "\ntotal blocks:\t" + str(partition["total blocks"]) + "\nfree blocks:\t" + str(partition["free blocks"]) + "\n" + print "mountpoint:\t" + str(partition["mountpoint"]) + \ + "\nfilesystem:\t" + str(partition["filesystem"]) + \ + "\nblocksize:\t" + str(partition["blocksize"]) + \ + "\ntotal blocks:\t" + str(partition["total blocks"]) + \ + "\nfree blocks:\t" + str(partition["free blocks"]) + "\n" else: print "\n"