1 from GUIComponent import *
2 from VariableText import *
5 from enigma import eLabel
7 # TODO: Harddisk.py has similiar functions, but only similiar.
8 # fix this to use same code
9 class DiskInfo(VariableText, GUIComponent):
14 def __init__(self, path, type, update = True):
15 GUIComponent.__init__(self)
16 VariableText.__init__(self)
24 stat = statvfs(self.path)
28 if self.type == self.FREE:
29 free = stat.f_bfree / 1000 * stat.f_bsize / 1000
30 self.setText(("%d MB " + _("free diskspace")) % (free))