# HG changeset patch # User Emmanuel Gil Peyrot # Date 1415115899 -3600 # Node ID e9300aae4b241692fdf07162fe44c00fc0907060 # Parent c842270227652c41e1249e7070e5b3d45dea72ee Display the traceback on module load error. diff --git a/scripts/pytouhou b/scripts/pytouhou --- 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