From f566b2eeda930447dea5ef80185edfa27689b28e Mon Sep 17 00:00:00 2001 From: augustin64 Date: Wed, 10 Apr 2024 12:15:14 +0200 Subject: [PATCH] Potentially fix no-discord --- modules/Classes/Config.py | 9 +++++++-- modules/Classes/DiscordConfig.py | 4 ++-- version | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/Classes/Config.py b/modules/Classes/Config.py index f3fe166..38a3e6c 100644 --- a/modules/Classes/Config.py +++ b/modules/Classes/Config.py @@ -50,9 +50,14 @@ class Config: """ self.discord = DiscordConfig() self.discord.avatar_url = settings["avatarlink"] - self.discord.wh_link = discord[config[args.config]["discord"]]["errorsL"] - if self.discord.wh_link != "": + if ( + "discord" in config[args.config] + and config[args.config]["discord"] in discord + and "errorsL" in discord[config[args.config]["discord"]] + and discord[config[args.config]["discord"]]["errorsL"] != "" + ): + self.discord.wh_link = discord[config[args.config]["discord"]]["errorsL"] self.discord.wh = Webhook.from_url(self.discord.wh_link, adapter=RequestsWebhookAdapter()) else: self.discord.wh = FakeWebHook() diff --git a/modules/Classes/DiscordConfig.py b/modules/Classes/DiscordConfig.py index bce1c7a..2ab9aa3 100644 --- a/modules/Classes/DiscordConfig.py +++ b/modules/Classes/DiscordConfig.py @@ -9,6 +9,6 @@ class DiscordConfig: class FakeWebHook: - def send(self, *args): - debug(f"Used a webhook call without webhook url with {args}") + def send(self, *args, **kwargs): + debug(f"Used a webhook call without webhook url with {args} {kwargs}") diff --git a/version b/version index 4a4d266..4f85350 100644 --- a/version +++ b/version @@ -1 +1 @@ -v6.8.44 +v6.8.45