don't offer scanning on nims where nothing is connected
[enigma2.git] / lib / python / Screens / MessageBox.py
index 8a5989c7234a72f4ef0207618fe27fe5796a6da7..86bf07d3b69bff1fc2b18799d521d548e2b35419 100644 (file)
@@ -43,7 +43,7 @@ class MessageBox(Screen):
                        else:
                                self.list = [ (_("no"), 1), (_("yes"), 0) ]
                
-               if len(self.list):
+               if self.list:
                        self["selectedChoice"].setText(self.list[0][0])
                self["list"] = MenuList(self.list)
 
@@ -88,6 +88,7 @@ class MessageBox(Screen):
        def stopTimer(self):
                if self.timerRunning:
                        del self.timer
+                       self.onExecBegin.remove(self.startTimer)
                        self.setTitle(self.origTitle)
                        self.timerRunning = False
 
@@ -134,7 +135,7 @@ class MessageBox(Screen):
                if self.close_on_any_key:
                        self.close(True)
                self["list"].instance.moveSelection(direction)
-               if len(self.list):
+               if self.list:
                        self["selectedChoice"].setText(self["list"].getCurrent()[0])
                self.stopTimer()