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(GUIComponent, VariableText):
14 def __init__(self, path, type):
15 GUIComponent.__init__(self)
16 VariableText.__init__(self)
23 stat = os.statvfs(self.path)
27 if self.type == self.FREE:
28 free = stat.f_bfree / 1000 * stat.f_bsize / 1000
29 self.setText(("%dMB " + _("free diskspace")) % (free))
31 def createWidget(self, parent):