From 9188e4a7ec0f1ca4661bfde68ae8c77fdb0af7b6 Mon Sep 17 00:00:00 2001 From: Wyn Date: Wed, 2 May 2018 04:35:48 -0400 Subject: [PATCH] [V3 Info] Don't rely on redirect (#1581) * [V3 Info] Don't rely on redirect Http -> Https * Update core_commands.py Use existing variable instead of new string * Update events.py Remove redirect, url only reference --- redbot/core/core_commands.py | 2 +- redbot/core/events.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 7bcc41d94..7314b87c0 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -72,7 +72,7 @@ class Core: owner = app_info.owner async with aiohttp.ClientSession() as session: - async with session.get("http://pypi.python.org/pypi/red-discordbot/json") as r: + async with session.get('{}/json'.format(red_pypi)) as r: data = await r.json() outdated = StrictVersion(data["info"]["version"]) > StrictVersion(__version__) about = ( diff --git a/redbot/core/events.py b/redbot/core/events.py index a54feaeb9..7a9bf22da 100644 --- a/redbot/core/events.py +++ b/redbot/core/events.py @@ -110,7 +110,7 @@ def init_events(bot, cli_flags): INFO.append('{} cogs with {} commands'.format(len(bot.cogs), len(bot.commands))) async with aiohttp.ClientSession() as session: - async with session.get("http://pypi.python.org/pypi/red-discordbot/json") as r: + async with session.get("https://pypi.python.org/pypi/red-discordbot/json") as r: data = await r.json() if StrictVersion(data["info"]["version"]) > StrictVersion(red_version): INFO.append(