From 274105ff6d8b9b77ecda6e8abde12a8af23f93c8 Mon Sep 17 00:00:00 2001 From: hernani Date: Thu, 1 Jul 2010 14:48:21 +0000 Subject: [PATCH] Logs module import errors. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@480 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/modules/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/forum/modules/__init__.py b/forum/modules/__init__.py index 77a266f..07cbc6e 100644 --- a/forum/modules/__init__.py +++ b/forum/modules/__init__.py @@ -1,6 +1,7 @@ import os import types import re +import logging from django.template import Template, TemplateDoesNotExist from django.conf import settings @@ -29,9 +30,10 @@ def get_modules_script(script_name): #print repr(type(e)) + m.__name__ + ":" + str(e) pass except: - pass - #import sys, traceback - #traceback.print_exc(file=sys.stdout) + import traceback + logging.error("Error importing %s from module %s: \n %s" % ( + script_name, m.__name__, traceback.format_exc() + )) return all -- 2.39.5