aboutsummaryrefslogtreecommitdiff
path: root/components.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-04-27 02:32:56 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-04-27 02:32:56 +0000
commitec6cfceaa66fc2243e08001178c70fb5db9fcc50 (patch)
tree83d0c43a816a16ace80b4cf9701470a8fe530de1 /components.py
parentda40b2aac3c7b8efdc9061aadf9038306f44789c (diff)
downloadenigma2-ec6cfceaa66fc2243e08001178c70fb5db9fcc50.tar.gz
enigma2-ec6cfceaa66fc2243e08001178c70fb5db9fcc50.zip
- actionmap component will not catch (wrong) exceptions anymore
- fixed scan error handling when scan failed to start
Diffstat (limited to 'components.py')
-rw-r--r--components.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/components.py b/components.py
index 93e4b07d..de5d6d24 100644
--- a/components.py
+++ b/components.py
@@ -378,12 +378,12 @@ class ServiceScan:
Error = 4
Errors = {
+ 0: "error starting scanning",
1: "error while scanning",
2: "no resource manager",
3: "no channel list"
}
-
-
+
def scanStatusChanged(self):
if self.state == self.Running:
self.progressbar.setValue(self.scan.getProgress())
@@ -414,8 +414,10 @@ class ServiceScan:
def execBegin(self):
self.scan.statusChanged.get().append(self.scanStatusChanged)
self.state = self.Running
- if self.scan.start():
+ err = self.scan.start()
+ if err:
self.state = self.Error
+ self.errorcode = 0
self.scanStatusChanged()
@@ -446,9 +448,9 @@ class ActionMap:
def action(self, context, action):
print " ".join(("action -> ", context, action))
- try:
+ if self.actions.has_key(action):
self.actions[action]()
- except KeyError:
+ else:
print "unknown action %s/%s! typo in keymap?" % (context, action)
class PerServiceDisplay(GUIComponent, VariableText):
@@ -527,3 +529,4 @@ class ServiceName(PerServiceDisplay):
def stopEvent(self):
self.setText("");
+