use 'in', add killAll
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Feb 2009 22:10:45 +0000 (23:10 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Feb 2009 22:10:45 +0000 (23:10 +0100)
lib/python/Components/Console.py

index 7efdf64..a41317e 100755 (executable)
@@ -57,6 +57,10 @@ class Console(object):
                del self.callbacks[name]
 
        def kill(self,name):
                del self.callbacks[name]
 
        def kill(self,name):
-               if self.appContainers.has_key(name):
+               if name in self.appContainers:
                        print "[Console] killing: ",self.appContainers[name]
                        self.appContainers[name].kill()
                        print "[Console] killing: ",self.appContainers[name]
                        self.appContainers[name].kill()
+
+       def killAll(self):
+               for name in self.appContainers:
+                       self.kill(name)