X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/f5f883ab101be733caa56ee5ff3e4ffb7225ac3d..49d0961a6f7f585f707cd08817f3e0a9f1a19212:/forum/modules/__init__.py?ds=inline diff --git a/forum/modules/__init__.py b/forum/modules/__init__.py index 77a266f..a8a5665 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 @@ -106,4 +108,4 @@ def module_templates_loader(name, dirs=None): module_templates_loader.is_usable = True -from decorators import decorate +from decorators import decorate, ReturnImediatelyException