Fix error message which can make crazy

This commit is contained in:
root 2014-05-13 01:40:52 +02:00
parent e0f2061852
commit 8bdb79cfba

View file

@ -291,9 +291,9 @@ def init_authenticator((vendor, name), kwargs={}):
"""
try:
mod = import_module('moulinette.authenticators.%s' % vendor)
except ImportError:
except ImportError as e:
# TODO: List available authenticators vendors
raise MoulinetteError(errno.EINVAL, _("Unknown authenticator vendor '%s'" % vendor))
raise MoulinetteError(errno.EINVAL, _("Unable to load authenticator vendor '%s': %s") % (vendor, str(e)))
else:
return mod.Authenticator(name, **kwargs)