X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=lcm%2Fosm_common%2Fdbbase.py;h=b101cb433ca73c61a870e8b8b2b2cb15d590a639;hb=refs%2Ftags%2Fv3.0.3;hp=a2768ae095d0100fb77e82df54174eee7fab6f40;hpb=c887cc2fdd02c898ecd1f08d6927043027fd07eb;p=osm%2FRO.git diff --git a/lcm/osm_common/dbbase.py b/lcm/osm_common/dbbase.py index a2768ae0..b101cb43 100644 --- a/lcm/osm_common/dbbase.py +++ b/lcm/osm_common/dbbase.py @@ -1,14 +1,17 @@ +from http import HTTPStatus + +__author__ = "Alfonso Tierno " class DbException(Exception): - def __init__(self, message, http_code=404): + def __init__(self, message, http_code=HTTPStatus.NOT_FOUND): # TODO change to http.HTTPStatus instead of int that allows .value and .name self.http_code = http_code - Exception.__init__(self, message) + Exception.__init__(self, "database exception " + message) -class dbbase(object): +class DbBase(object): def __init__(self): pass