From: Christian Herdtweck Date: Thu, 14 Jan 2016 13:04:32 +0000 (+0100) Subject: added a todo and forgotten 'self's X-Git-Tag: v1.2~67 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=66fb5265ff5fc8822772e4be6b2cd712b0d74c76;p=pyi2ncommon added a todo and forgotten 'self's --- diff --git a/file_helpers.py b/file_helpers.py index 3610c7b..bfc8db3 100644 --- a/file_helpers.py +++ b/file_helpers.py @@ -48,12 +48,12 @@ class FilesystemFillState: """ def __init__(self): - name = None - size = None - used = None - available = None - capacity = None - mount_point = None + self.name = None + self.size = None + self.used = None + self.available = None + self.capacity = None + self.mount_point = None def __str__(self): return '[Filesystem {0} mounted at {1}: {2}% used]' \ @@ -64,6 +64,10 @@ def get_filesystem_fill_states(): parses the output of cmd 'df', returns list of :py:class:`FilesystemFillState` + + ..todo:: replace call to df (which forks) by call to statvfs combined with + some way to find all mounted partitions (parse /proc/mounts + whenever it changes) """ # call