fix: use more explicit import in config constructor
This commit is contained in:
parent
f5825e964c
commit
fd76766f56
|
@ -231,7 +231,7 @@ class WuttaConfig:
|
|||
|
||||
# configure main app DB if applicable, or disable usedb flag
|
||||
try:
|
||||
from .db import Session, get_engines
|
||||
from wuttjamaican.db import Session, get_engines
|
||||
except ImportError:
|
||||
if self.usedb:
|
||||
log.warning("config created with `usedb = True`, but can't import "
|
||||
|
|
|
@ -183,7 +183,7 @@ preferdb = true
|
|||
orig_import = __import__
|
||||
|
||||
def mock_import(name, *args, **kwargs):
|
||||
if name == 'db':
|
||||
if name == 'wuttjamaican.db':
|
||||
raise ImportError
|
||||
return orig_import(name, *args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue