fixes for python 2.6 by Moritz Venn
[enigma2.git] / lib / python / Components / Converter / ServicePosition.py
index d7a55daea47ce81cc5f1bb4b04f8fcc7461ed5e1..2bcc54929eb4ca3cbb1d28e1f91033f8b16a0750 100644 (file)
@@ -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|NoSeconds}")
 
                self.poll_enabled = self.type != self.TYPE_LENGTH