misc(updatechecker): moved parsed_url
Some checks failed
Build Documentation and Lint Code / build and lint (pull_request) Failing after 25s
Some checks failed
Build Documentation and Lint Code / build and lint (pull_request) Failing after 25s
This commit is contained in:
parent
be687a58fa
commit
0695dc061e
1 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,8 @@ class UpdateChecker(commands.Cog):
|
||||||
repo = cog._repo_manager.get_repo(repo_name)
|
repo = cog._repo_manager.get_repo(repo_name)
|
||||||
if not repo:
|
if not repo:
|
||||||
continue
|
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"
|
url = repo.url + r"/commits/" + repo.branch + ".atom"
|
||||||
response = await self.fetch_feed(url)
|
response = await self.fetch_feed(url)
|
||||||
try:
|
try:
|
||||||
|
@ -127,7 +128,6 @@ class UpdateChecker(commands.Cog):
|
||||||
else:
|
else:
|
||||||
url = repo.url + r"/rss/branch/" + repo.branch
|
url = repo.url + r"/rss/branch/" + repo.branch
|
||||||
response = await self.fetch_feed(url)
|
response = await self.fetch_feed(url)
|
||||||
parsed_url = urlparse(repo.url)
|
|
||||||
try:
|
try:
|
||||||
commit = response.entries[0]["id"][33:]
|
commit = response.entries[0]["id"][33:]
|
||||||
hash = "[" + commit + "](" + response.entries[0]["link"] + ")"
|
hash = "[" + commit + "](" + response.entries[0]["link"] + ")"
|
||||||
|
|
Loading…
Reference in a new issue