git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- actionmap component will not catch (wrong) exceptions anymore
[enigma2.git]
/
components.py
diff --git
a/components.py
b/components.py
index 93e4b07d9a76393875794fbacd2f538f06961d04..de5d6d24605dd92c0b45928db1eae5d0702ad9f2 100644
(file)
--- a/
components.py
+++ b/
components.py
@@
-378,12
+378,12
@@
class ServiceScan:
Error = 4
Errors = {
Error = 4
Errors = {
+ 0: "error starting scanning",
1: "error while scanning",
2: "no resource manager",
3: "no channel list"
}
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())
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
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.state = self.Error
+ self.errorcode = 0
self.scanStatusChanged()
self.scanStatusChanged()
@@
-446,9
+448,9
@@
class ActionMap:
def action(self, context, action):
print " ".join(("action -> ", context, action))
def action(self, context, action):
print " ".join(("action -> ", context, action))
-
try
:
+
if self.actions.has_key(action)
:
self.actions[action]()
self.actions[action]()
- e
xcept KeyError
:
+ e
lse
:
print "unknown action %s/%s! typo in keymap?" % (context, action)
class PerServiceDisplay(GUIComponent, VariableText):
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("");
def stopEvent(self):
self.setText("");
+