X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/77bb53beb46f6984e1529c4f703523c146956d0f..88078e7ac2ee289a0dfc321d71c7494657c4457c:/lib/python/Components/Converter/ClockToText.py diff --git a/lib/python/Components/Converter/ClockToText.py b/lib/python/Components/Converter/ClockToText.py index 3abfffc5..5cc709f2 100644 --- a/lib/python/Components/Converter/ClockToText.py +++ b/lib/python/Components/Converter/ClockToText.py @@ -1,5 +1,6 @@ from Converter import Converter from time import localtime, strftime +from Components.Element import cached class ClockToText(Converter, object): DEFAULT = 0 @@ -10,8 +11,8 @@ class ClockToText(Converter, object): # add: date, date as string, weekday, ... # (whatever you need!) - def __init__(self, type, *args, **kwargs): - Converter.__init__(self) + def __init__(self, type): + Converter.__init__(self, type) if type == "WithSeconds": self.type = self.WITH_SECONDS elif type == "InMinutes": @@ -21,6 +22,7 @@ class ClockToText(Converter, object): else: self.type = self.DEFAULT + @cached def getText(self): time = self.source.time if time is None: