From: Fraxinas Date: Thu, 4 Dec 2008 10:18:09 +0000 (+0100) Subject: allow callback-less ePopen X-Git-Tag: 2.6.0~561 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/bf85c027880227646227e9f4ffc658e81eae5c69?hp=c2bbed774d6e5c51b4af23a60a95aca74aa5d4e9 allow callback-less ePopen --- 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]