projects
/
osm
/
LCM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feature 10954 to automatically select WIMs for inter-datacenter networks
[osm/LCM.git]
/
osm_lcm
/
data_utils
/
database
/
database.py
diff --git
a/osm_lcm/data_utils/database/database.py
b/osm_lcm/data_utils/database/database.py
index
eeb44c4
..
dc7c8d9
100644
(file)
--- a/
osm_lcm/data_utils/database/database.py
+++ b/
osm_lcm/data_utils/database/database.py
@@
-30,7
+30,7
@@
from osm_common.dbbase import DbException
class Database:
class __Database:
def __init__(self, config):
class Database:
class __Database:
def __init__(self, config):
- self.logger = logging.getLogger(
'lcm'
)
+ self.logger = logging.getLogger(
"lcm"
)
try:
# TODO check database version
if config["database"]["driver"] == "mongo":
try:
# TODO check database version
if config["database"]["driver"] == "mongo":
@@
-40,8
+40,11
@@
class Database:
self.db = dbmemory.DbMemory()
self.db.db_connect(config["database"])
else:
self.db = dbmemory.DbMemory()
self.db.db_connect(config["database"])
else:
- raise Exception("Invalid configuration param '{}' at '[database]':'driver'".format(
- config["database"]["driver"]))
+ raise Exception(
+ "Invalid configuration param '{}' at '[database]':'driver'".format(
+ config["database"]["driver"]
+ )
+ )
except (DbException) as e:
self.logger.critical(str(e), exc_info=True)
raise Exception(str(e))
except (DbException) as e:
self.logger.critical(str(e), exc_info=True)
raise Exception(str(e))