From 07aeea44c2bbc4daa8143c36eef5709e21f3ea5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Sat, 28 Jan 2023 21:15:59 +0100 Subject: [PATCH] Remove unneeded variable --- discord_rss_bot/webhook.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/discord_rss_bot/webhook.py b/discord_rss_bot/webhook.py index 66e2fad..c78be44 100644 --- a/discord_rss_bot/webhook.py +++ b/discord_rss_bot/webhook.py @@ -38,14 +38,12 @@ def add_webhook(reader: Reader, webhook_name: str, webhook_url: str): def remove_webhook(reader: Reader, webhook_url: str): - clean_webhook_url: str = webhook_url.strip() - # Get current webhooks from the database if they exist otherwise use an empty list. webhooks: list[dict[str, str]] = list_webhooks(reader) # Only add the webhook if it doesn't already exist. for webhook in webhooks: - if webhook["url"] in clean_webhook_url: + if webhook["url"] in webhook_url.strip(): webhooks.remove(webhook) # Check if it has been removed.