From bf85c027880227646227e9f4ffc658e81eae5c69 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Thu, 4 Dec 2008 11:18:09 +0100 Subject: [PATCH 1/1] allow callback-less ePopen --- lib/python/Components/Console.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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] -- 2.30.2