3
0
Fork 0

fix: use more explicit import in config constructor

This commit is contained in:
Lance Edgar 2024-07-04 11:37:21 -05:00
parent f5825e964c
commit fd76766f56
2 changed files with 2 additions and 2 deletions

View file

@ -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 "

View file

@ -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)