- fix character conversion for DVB
[enigma2.git] / mytest.py
index 68d777a9ee562cacf961ff07e344dbaf89dc439a..53054d9a1d98d4a5c65cf36ecf67c76a6920d836 100644 (file)
--- 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)
@@ -163,8 +172,21 @@ skin.loadSkin(getDesktop())
 import Components.InputDevice
 Components.InputDevice.InitInputDevices()
 
+import Components.AVSwitch
+Components.AVSwitch.InitAVSwitch()
+
+import Components.SetupDevices
+Components.SetupDevices.InitSetupDevices()
+
 # 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