PEP8: Fix whitespace
[openblackhole/openblackhole-enigma2.git] / lib / python / Components / Renderer / ChannelNumber.py
1 from Components.VariableText import VariableText
2 from enigma import eLabel, iPlayableService
3 from Renderer import Renderer
4
5 class ChannelNumber(Renderer, VariableText):
6         def __init__(self):
7                 Renderer.__init__(self)
8                 VariableText.__init__(self)
9                 self.text = "---"
10         GUI_WIDGET = eLabel
11
12         def changed(self, what):
13                 if what == True or what[0] == self.CHANGED_SPECIFIC and what[1] == iPlayableService.evStart:
14                         service = self.source.serviceref
15                         num = service and service.getChannelNum() or None
16                         if num:
17                                 self.text = str(num)
18                         else:
19                                 self.text = '---'