diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-12-04 11:18:09 +0100 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-12-04 11:18:09 +0100 |
| commit | bf85c027880227646227e9f4ffc658e81eae5c69 (patch) | |
| tree | f31c12b96ad1535d79ce6c2ff183af72e672476f /lib/python | |
| parent | c2bbed774d6e5c51b4af23a60a95aca74aa5d4e9 (diff) | |
| download | enigma2-bf85c027880227646227e9f4ffc658e81eae5c69.tar.gz enigma2-bf85c027880227646227e9f4ffc658e81eae5c69.zip | |
allow callback-less ePopen
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/Console.py | 5 |
1 files 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] |
