aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-10-04 13:33:16 -0700
committerGravatar MarkKoz <[email protected]>2019-10-04 13:33:16 -0700
commita09ca83f9368a664f147071f85cb4b34489d0224 (patch)
treebb0359d4505105b812465a24c425a473a9d55384
parentMerge pull request #481 from bendiller/fetch_posts_retries (diff)
Fix error when symbol_id cannot be found in doc HTML
-rw-r--r--bot/cogs/doc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py
index c9e6b3b91..0c5a8fce3 100644
--- a/bot/cogs/doc.py
+++ b/bot/cogs/doc.py
@@ -207,6 +207,9 @@ class Doc(commands.Cog):
symbol_heading = soup.find(id=symbol_id)
signature_buffer = []
+ if symbol_heading is None:
+ return None
+
# Traverse the tags of the signature header and ignore any
# unwanted symbols from it. Add all of it to a temporary buffer.
for tag in symbol_heading.strings: