From 0695dc061e67ed4d3f5f7c7fdf35e4d1cd5dc6a3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sun, 7 Jan 2024 13:59:20 +0000 Subject: [PATCH] misc(updatechecker): moved parsed_url --- updatechecker/updatechecker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updatechecker/updatechecker.py b/updatechecker/updatechecker.py index 3aea860..dada2a8 100644 --- a/updatechecker/updatechecker.py +++ b/updatechecker/updatechecker.py @@ -114,7 +114,8 @@ class UpdateChecker(commands.Cog): repo = cog._repo_manager.get_repo(repo_name) if not repo: continue - if repo.url.startswith("https://github.com"): + parsed_url = urlparse(repo.url) + if parsed_url.netloc == "github.com": url = repo.url + r"/commits/" + repo.branch + ".atom" response = await self.fetch_feed(url) try: @@ -127,7 +128,6 @@ class UpdateChecker(commands.Cog): else: url = repo.url + r"/rss/branch/" + repo.branch response = await self.fetch_feed(url) - parsed_url = urlparse(repo.url) try: commit = response.entries[0]["id"][33:] hash = "[" + commit + "](" + response.entries[0]["link"] + ")"