Fix module relative importing of consumer
This commit is contained in:
parent
ad51e0debe
commit
f7386d31d2
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ from .consumers import BaseConsumer
|
||||||
def get_consumer(name: str) -> Optional[Type[BaseConsumer]]:
|
def get_consumer(name: str) -> Optional[Type[BaseConsumer]]:
|
||||||
mod_name, cls_name = name.rsplit(".", 1)
|
mod_name, cls_name = name.rsplit(".", 1)
|
||||||
|
|
||||||
mod = importlib.import_module(f"consumers.{mod_name}")
|
mod = importlib.import_module(f".consumers.{mod_name}", package=__package__)
|
||||||
|
|
||||||
# print(mod)
|
# print(mod)
|
||||||
# print(dir(mod))
|
# print(dir(mod))
|
||||||
|
|
Loading…
Reference in a new issue