As it's not known whether the module is actually needed,
its not good to crash here.
Better would be to import the module only when actually needed,
but lets use this quick fix as temporary solution.
def register_handler_module(modname):
"""Import and module and register handlers."""
- __import__(modname)
+ try:
+ __import__(modname)
+ except ImportError:
+ print "Failed to load handler module: %s" % (modname,)
+ return
m = sys.modules[modname]
for h in m.__londiste_handlers__:
_handler_map[h.handler_name] = h