X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/4cc1f7a05166715c19c965e3bbbe74a43835a754..63f8fba0e343ed772e81ce4015583e33a6bdc6e0:/lib/python/Components/DiskInfo.py diff --git a/lib/python/Components/DiskInfo.py b/lib/python/Components/DiskInfo.py index 6f16b053..9490a0f8 100644 --- a/lib/python/Components/DiskInfo.py +++ b/lib/python/Components/DiskInfo.py @@ -11,12 +11,13 @@ class DiskInfo(GUIComponent, VariableText): USED = 1 SIZE = 2 - def __init__(self, path, type): + def __init__(self, path, type, update = True): GUIComponent.__init__(self) VariableText.__init__(self) self.type = type self.path = path - self.update() + if update: + self.update() def update(self): try: @@ -26,7 +27,7 @@ class DiskInfo(GUIComponent, VariableText): if self.type == self.FREE: free = stat.f_bfree / 1000 * stat.f_bsize / 1000 - self.setText("%dMB " + _("free diskspace") % (free)) + self.setText(("%dMB " + _("free diskspace")) % (free)) def createWidget(self, parent): return eLabel(parent)