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
+++ b/scripts/pytouhou
@@ -64,7 +64,7 @@ def load_module(type_, name, items=None)
     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 @@ for backend_name in args.backend:
 
     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