remove unneeded N/A
[enigma2.git] / lib / python / Components / Converter / EventName.py
index e391b95f358599584130718ddd0d7ef55ee07855..919dd3b0c2e97f37c0ba8a8795f542d4d5d9768e 100644 (file)
@@ -1,12 +1,13 @@
 from Components.Converter.Converter import Converter
+from Components.Element import cached
 
 class EventName(Converter, object):
        NAME = 0
        SHORT_DESCRIPTION = 1
        EXTENDED_DESCRIPTION = 2
 
-       def __init__(self, type, *args, **kwargs):
-               Converter.__init__(self)
+       def __init__(self, type):
+               Converter.__init__(self, type)
                if type == "Description":
                        self.type = self.SHORT_DESCRIPTION
                elif type == "ExtendedDescription":
@@ -14,10 +15,11 @@ class EventName(Converter, object):
                else:
                        self.type = self.NAME
 
+       @cached
        def getText(self):
                event = self.source.event
                if event is None:
-                       return ""
+                       return "N/A"
                        
                if self.type == self.NAME:
                        return event.getEventName()