X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/c2bbed774d6e5c51b4af23a60a95aca74aa5d4e9..bf85c027880227646227e9f4ffc658e81eae5c69:/lib/python/Components/Console.py diff --git a/lib/python/Components/Console.py b/lib/python/Components/Console.py index c5fa5f98..136d10d0 100644 --- a/lib/python/Components/Console.py +++ b/lib/python/Components/Console.py @@ -8,7 +8,7 @@ class Console(object): self.callbacks = {} self.extra_args = {} - def ePopen(self, cmd, callback, extra_args=[]): + def ePopen(self, cmd, callback=None, extra_args=[]): name = cmd i = 0 while self.appContainers.has_key(name): @@ -50,5 +50,6 @@ class Console(object): extra_args = self.extra_args[name] del self.appContainers[name] del self.extra_args[name] - self.callbacks[name](data,retval,extra_args) + if self.callbacks[name]: + self.callbacks[name](data,retval,extra_args) del self.callbacks[name]