projects
/
osm
/
RO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lightweight exception capturing, logging
[osm/RO.git]
/
lcm
/
osm_common
/
dbbase.py
diff --git
a/lcm/osm_common/dbbase.py
b/lcm/osm_common/dbbase.py
index
a2768ae
..
b101cb4
100644
(file)
--- a/
lcm/osm_common/dbbase.py
+++ b/
lcm/osm_common/dbbase.py
@@
-1,14
+1,17
@@
+from http import HTTPStatus
+
+__author__ = "Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>"
class DbException(Exception):
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
# 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
dbb
ase(object):
+class
DbB
ase(object):
def __init__(self):
pass
def __init__(self):
pass