changeset 603:e9300aae4b24

Display the traceback on module load error.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 04 Nov 2014 16:44:59 +0100
parents c84227022765
children aca9551ee8b4
files scripts/pytouhou
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pytouhou	Sat Oct 25 20:02:56 2014 +0200
+++ b/scripts/pytouhou	Tue Nov 04 16:44:59 2014 +0100
@@ -64,7 +64,7 @@
     try:
         module = import_module('pytouhou.games.%s.%s' % (name, type_))
     except ImportError:
-        logger.critical('Module “%s” doesn’t contain %s data, aborting.', name, type_)
+        logger.exception('Module “%s” doesn’t contain %s data, aborting:', name, type_)
         sys.exit(1)
     if items is None:
         return module
@@ -96,13 +96,13 @@
 
     try:
         backend = import_module('pytouhou.ui.%s.backend' % backend_name)
-    except ImportError as e:
+    except ImportError:
         logger.exception('Failed to import backend %s:', backend_name)
         continue
 
     try:
         backend.init(options)
-    except Exception as e:
+    except Exception:
         logger.exception('Backend %s failed to initialize:', backend_name)
         continue