diff --git a/moulinette/core.py b/moulinette/core.py index 1bdd602a..894c85b8 100644 --- a/moulinette/core.py +++ b/moulinette/core.py @@ -412,8 +412,11 @@ def clean_session(session_id, profiles=[]): class MoulinetteError(StandardError): """Moulinette base exception""" - def __init__(self, key, *args, **kwargs): - msg = moulinette.m18n.g(key, *args, **kwargs) + def __init__(self, key, __raw_msg__=False, *args, **kwargs): + if __raw_msg__: + msg = key + else: + msg = moulinette.m18n.g(key, *args, **kwargs) super(MoulinetteError, self).__init__(msg) self.strerror = msg