aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-08-28 22:44:48 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-08-28 22:44:48 +0000
commit5bc448fa31030717216abbfd16d3f4d20241cab7 (patch)
tree753295111bde7f04c1f3528d24c1aad381a12630
parentfb298c769ccf5cb29f8461cbef280c969c8f6e26 (diff)
downloadenigma2-5bc448fa31030717216abbfd16d3f4d20241cab7.tar.gz
enigma2-5bc448fa31030717216abbfd16d3f4d20241cab7.zip
- add some exit-on-crash stuff, hope it catches the important cases
-rw-r--r--mytest.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/mytest.py b/mytest.py
index 68d777a9..d04990d6 100644
--- a/mytest.py
+++ b/mytest.py
@@ -1,6 +1,7 @@
from enigma import *
from tools import *
+import traceback
import Screens.InfoBar
import sys
@@ -95,7 +96,15 @@ class Session:
def instantiateDialog(self, screen, *arguments):
# create dialog
- dlg = self.create(screen, arguments)
+
+ try:
+ dlg = self.create(screen, arguments)
+ except:
+ print 'EXCEPTION IN DIALOG INIT CODE, ABORTING:'
+ print '-'*60
+ traceback.print_exc(file=sys.stdout)
+ quitMainloop()
+ print '-'*60
# read skin data
readSkin(dlg, None, dlg.skinName, self.desktop)
@@ -164,7 +173,14 @@ import Components.InputDevice
Components.InputDevice.InitInputDevices()
# first, setup a screen
-runScreenTest()
+try:
+ runScreenTest()
+except:
+ print 'EXCEPTION IN PYTHON STARTUP CODE:'
+ print '-'*60
+ traceback.print_exc(file=sys.stdout)
+ quitMainloop()
+ print '-'*60
# now, run the mainloop