a1054146071c05d8379d5ec5eca6730f5165c049
2 from http
import HTTPStatus
4 __author__
= "Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>"
7 class MsgException(Exception):
9 Base Exception class for all msgXXXX exceptions
12 def __init__(self
, message
, http_code
=HTTPStatus
.INTERNAL_SERVER_ERROR
):
15 :param message: descriptive text
16 :param http_code: <http.HTTPStatus> type. It contains ".value" (http error code) and ".name" (http error name
18 self
.http_code
= http_code
19 Exception.__init
__(self
, "messaging exception " + message
)
22 class MsgBase(object):
24 Base class for all msgXXXX classes
30 def connect(self
, config
):