
from moulinette.core import MoulinetteError
from moulinette import m18n

class YunohostError(MoulinetteError):
    """Yunohost base exception"""
    def __init__(self, key, __raw_msg__=False, *args, **kwargs):
        if __raw_msg__:
            msg = key
        else:
            msg = m18n.n(key, *args, **kwargs)
        super(YunohostError, self).__init__(msg, __raw_msg__=True)



from moulinette.core import MoulinetteError
from moulinette import m18n

class YunohostError(MoulinetteError):
    """
    Yunohost base exception
    
    The (only?) main difference with MoulinetteError being that keys
    are translated via m18n.n (namespace) instead of m18n.g (global?)
    """
    def __init__(self, key, __raw_msg__=False, *args, **kwargs):
        if __raw_msg__:
            msg = key
        else:
            msg = m18n.n(key, *args, **kwargs)
        super(YunohostError, self).__init__(msg, __raw_msg__=True)


Add comment about the motivation behind YunohostError
Add comment about the motivation behind YunohostError
  
  from moulinette.core import MoulinetteError
  from moulinette import m18n
  
  class YunohostError(MoulinetteError):
+     """
-     """Yunohost base exception"""
+     Yunohost base exception
+     
+     The (only?) main difference with MoulinetteError being that keys
+     are translated via m18n.n (namespace) instead of m18n.g (global?)
+     """
      def __init__(self, key, __raw_msg__=False, *args, **kwargs):
          if __raw_msg__:
              msg = key
          else:
              msg = m18n.n(key, *args, **kwargs)
          super(YunohostError, self).__init__(msg, __raw_msg__=True)
  
  
Add comment about the motivation behind YunohostError
## Code Before:

from moulinette.core import MoulinetteError
from moulinette import m18n

class YunohostError(MoulinetteError):
    """Yunohost base exception"""
    def __init__(self, key, __raw_msg__=False, *args, **kwargs):
        if __raw_msg__:
            msg = key
        else:
            msg = m18n.n(key, *args, **kwargs)
        super(YunohostError, self).__init__(msg, __raw_msg__=True)


## Instruction:
Add comment about the motivation behind YunohostError
## Code After:

from moulinette.core import MoulinetteError
from moulinette import m18n

class YunohostError(MoulinetteError):
    """
    Yunohost base exception
    
    The (only?) main difference with MoulinetteError being that keys
    are translated via m18n.n (namespace) instead of m18n.g (global?)
    """
    def __init__(self, key, __raw_msg__=False, *args, **kwargs):
        if __raw_msg__:
            msg = key
        else:
            msg = m18n.n(key, *args, **kwargs)
        super(YunohostError, self).__init__(msg, __raw_msg__=True)

