X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/56ac7a4a764a4251a851778df09967405aa9a930..89b408592c0f5756b0049a60832761646477cfa0:/lib/python/Components/Converter/ServicePosition.py diff --git a/lib/python/Components/Converter/ServicePosition.py b/lib/python/Components/Converter/ServicePosition.py index d7a55dae..b92af40b 100644 --- a/lib/python/Components/Converter/ServicePosition.py +++ b/lib/python/Components/Converter/ServicePosition.py @@ -1,7 +1,7 @@ from Converter import Converter from Poll import Poll from enigma import iPlayableService -from Components.Element import cached +from Components.Element import cached, ElementError class ServicePosition(Converter, Poll, object): TYPE_LENGTH = 0 @@ -35,7 +35,7 @@ class ServicePosition(Converter, Poll, object): elif type == "Gauge": self.type = self.TYPE_GAUGE else: - raise "type must be {Length|Position|Remaining|Gauge} with optional arguments {Negate|Detailed|ShowHours|NoSeconds}" + raise ElementError("type must be {Length|Position|Remaining|Gauge} with optional arguments {Negate|Detailed|ShowHours|ShowNoSeconds} for ServicePosition converter") self.poll_enabled = self.type != self.TYPE_LENGTH @@ -128,8 +128,8 @@ class ServicePosition(Converter, Poll, object): value = property(getValue) def changed(self, what): - cutlist_refresh = what[0] != self.CHANGED_SPECIFIC or what[1] in [iPlayableService.evCuesheetChanged] - time_refresh = what[0] == self.CHANGED_POLL or what[0] == self.CHANGED_SPECIFIC and what[1] in [iPlayableService.evCuesheetChanged] + cutlist_refresh = what[0] != self.CHANGED_SPECIFIC or what[1] in (iPlayableService.evCuesheetChanged,) + time_refresh = what[0] == self.CHANGED_POLL or what[0] == self.CHANGED_SPECIFIC and what[1] in (iPlayableService.evCuesheetChanged,) if cutlist_refresh: if self.type == self.TYPE_GAUGE: