import os
import types
import re
+import logging
from django.template import Template, TemplateDoesNotExist
from django.conf import settings
for m in MODULE_LIST:
try:
all.append(__import__('%s.%s' % (m.__name__, script_name), globals(), locals(), [m.__name__]))
- except Exception, e:
- #print m.__name__ + ":" + str(e)
+ except ImportError, e:
+ #print repr(type(e)) + m.__name__ + ":" + str(e)
pass
+ except:
+ import traceback
+ msg = "Error importing %s from module %s: \n %s" % (
+ script_name, m.__name__, traceback.format_exc()
+ )
+ logging.error(msg)
return all
-def get_modules_scipt_implementations(script_name, impl_class):
+def get_modules_script_implementations(script_name, impl_class):
scripts = get_modules_script(script_name)
all_impls = {}
raise TemplateDoesNotExist, name
module_templates_loader.is_usable = True
+
+from decorators import decorate, ReturnImediatelyException