aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2021-03-31 20:19:28 +0200
committerGravatar kwzrd <[email protected]>2021-03-31 20:19:28 +0200
commitb778c25427108f4ffb20328c5977618e3f97c523 (patch)
treeb1f4411c47646253d68e1975fa0650e6dcc307f1
parentBranding: apply documentation improvements after review (diff)
Branding: log after successful fetch
Co-authored-by: Shivansh-007 <[email protected]> Co-authored-by: Joe Banks <[email protected]>
-rw-r--r--bot/exts/backend/branding/_repository.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/exts/backend/branding/_repository.py b/bot/exts/backend/branding/_repository.py
index 740a4a083..7b09d4641 100644
--- a/bot/exts/backend/branding/_repository.py
+++ b/bot/exts/backend/branding/_repository.py
@@ -107,6 +107,8 @@ class BrandingRepository:
async with self.bot.http_session.get(full_url, params=PARAMS, headers=HEADERS) as response:
if response.status != 200:
raise RuntimeError(f"Failed to fetch directory due to status: {response.status}")
+
+ log.debug("Fetch successful, reading JSON response.")
json_directory = await response.json()
return {file["name"]: RemoteObject(file) for file in json_directory if file["type"] in types}
@@ -122,6 +124,8 @@ class BrandingRepository:
async with self.bot.http_session.get(download_url, params=PARAMS, headers=HEADERS) as response:
if response.status != 200:
raise RuntimeError(f"Failed to fetch file due to status: {response.status}")
+
+ log.debug("Fetch successful, reading payload.")
return await response.read()
def parse_meta_file(self, raw_file: bytes) -> MetaFile: