fixed 'cancel when selecting service in timer crashed'
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 7 Apr 2006 23:03:57 +0000 (23:03 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 7 Apr 2006 23:03:57 +0000 (23:03 +0000)
lib/python/Screens/TimerEntry.py

index 7e2e55c..0e557a6 100644 (file)
@@ -231,15 +231,11 @@ class TimerEntry(Screen):
                else:
                        self.keyGo()
 
-       def finishedChannelSelection(self, args):
-               oldref = self.timer.service_ref
-               try:
-                       self.timer.service_ref = ServiceReference(args)
+       def finishedChannelSelection(self, *args):
+               if len(args):
+                       self.timer.service_ref = ServiceReference(args[0])
                        config.timerentry.service.vals = (str(self.timer.service_ref.getServiceName()),)
                        self["config"].invalidate(config.timerentry.service)
-               except:
-                       print "you pressed cancel"
-                       self.timer.service_ref = oldref
 
        def keyNumberGlobal(self, number):
                print "You pressed number " + str(number)