aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-12-20 10:02:49 +0200
committerGravatar ks129 <[email protected]>2020-12-20 10:02:49 +0200
commitd9fed5807429bb8029b8d623abed67ee03d211a4 (patch)
treeb45b232687dbfbff9b315298dfee8540ea5da63f
parentMove PEP related functions and command to own cog (diff)
Set last PEPs listing at beginning of function
-rw-r--r--bot/exts/utils/pep.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/utils/pep.py b/bot/exts/utils/pep.py
index 71c710087..d60a40658 100644
--- a/bot/exts/utils/pep.py
+++ b/bot/exts/utils/pep.py
@@ -35,6 +35,7 @@ class PythonEnhancementProposals(Cog):
# Wait until HTTP client is available
await self.bot.wait_until_ready()
log.trace("Started refreshing PEP URLs.")
+ self.last_refreshed_peps = datetime.now()
async with self.bot.http_session.get(self.PEPS_LISTING_API_URL) as resp:
listing = await resp.json()
@@ -47,7 +48,6 @@ class PythonEnhancementProposals(Cog):
pep_number = name.replace("pep-", "").split(".")[0]
self.peps[int(pep_number)] = file["download_url"]
- self.last_refreshed_peps = datetime.now()
log.info("Successfully refreshed PEP URLs listing.")
@staticmethod