Fix module relative importing of consumer

This commit is contained in:
Odd Stråbø 2023-01-07 19:01:03 +01:00
parent ad51e0debe
commit f7386d31d2

View file

@ -12,7 +12,7 @@ from .consumers import BaseConsumer
def get_consumer(name: str) -> Optional[Type[BaseConsumer]]:
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(dir(mod))