Merge "db: Avoid import variable shadowing"
This commit is contained in:
commit
7508e1ab0d
@ -27,7 +27,7 @@ import threading
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_db import exception as db_exception
|
from oslo_db import exception as db_exception
|
||||||
from oslo_db.sqlalchemy import session
|
from oslo_db.sqlalchemy import session as oslo_db_session
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
import osprofiler.sqlalchemy
|
import osprofiler.sqlalchemy
|
||||||
@ -82,7 +82,7 @@ def _create_facade_lazily():
|
|||||||
if _FACADE is None:
|
if _FACADE is None:
|
||||||
with _LOCK:
|
with _LOCK:
|
||||||
if _FACADE is None:
|
if _FACADE is None:
|
||||||
_FACADE = session.EngineFacade.from_config(CONF)
|
_FACADE = oslo_db_session.EngineFacade.from_config(CONF)
|
||||||
|
|
||||||
if CONF.profiler.enabled and CONF.profiler.trace_sqlalchemy:
|
if CONF.profiler.enabled and CONF.profiler.trace_sqlalchemy:
|
||||||
osprofiler.sqlalchemy.add_tracing(sqlalchemy,
|
osprofiler.sqlalchemy.add_tracing(sqlalchemy,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user