<s> """<STR_LIT>""" <EOL> from django . utils . translation import ugettext as _ <EOL> class ModoboaException ( Exception ) : <EOL> """<STR_LIT>""" <EOL> http_code = None <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> if '<STR_LIT>' in kwargs : <EOL> self . http_code = kwargs [ '<STR_LIT>' ] <EOL> del kwargs [ '<STR_LIT>' ] <EOL> super ( ModoboaException , self ) . __init__ ( * args , ** kwargs ) <EOL> class InternalError ( ModoboaException ) : <EOL> """<STR_LIT>""" <EOL> http_code = <NUM_LIT> <EOL> class BadRequest ( ModoboaException ) : <EOL> """<STR_LIT>""" <EOL> http_code = <NUM_LIT> <EOL> class NotFound ( ModoboaException ) : <EOL> """<STR_LIT>""" <EOL> http_code = <NUM_LIT> <EOL> class Conflict ( ModoboaException ) : <EOL> """<STR_LIT>""" <EOL> http_code = <NUM_LIT> <EOL> class PermDeniedException ( ModoboaException ) : <EOL> """<STR_LIT>""" <EOL> http_code = <NUM_LIT> <EOL> def __init__ ( self , msg = None ) : <EOL> self . msg = msg <EOL> def __str__ ( self ) : <EOL> if self . msg : <EOL> return _ ( "<STR_LIT>" % self . msg ) <EOL> return _ ( "<STR_LIT>" ) </s>
