From 1a21e91681cf9da52573a64adfa3d13761f31641 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 15 Sep 2020 18:56:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20attribute=20error=20in=20t?= =?UTF-8?q?he=20launcher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- royalnet/__main__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/royalnet/__main__.py b/royalnet/__main__.py index 47b9b383..2fc1a11e 100644 --- a/royalnet/__main__.py +++ b/royalnet/__main__.py @@ -95,7 +95,8 @@ def run(config_file: str): else: log.debug("__serfs__: Configured") - def configure_serf(n: str, module, class_: Type[rs.Serf]): + def configure_serf(n: str, module): + class_ = module.__getattribute__(f"{n}Serf") serf_cfg = serfs_cfg.get(n) if module is None: log.info(f"Serf.{n}: Not installed") @@ -122,8 +123,8 @@ def run(config_file: str): processes[f"Serf.{n}"] = ru.RoyalnetProcess(serf_constructor, None) log.info(f"Serf.{n}: Enabled") - configure_serf("Telegram", rst, rst.TelegramSerf) - configure_serf("Discord", rsd, rsd.DiscordSerf) + configure_serf("Telegram", rst) + configure_serf("Discord", rsd) # Constellation constellation_cfg = config.get("Constellation")