aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-10-06 15:03:05 -0400
committerGravatar GitHub <[email protected]>2019-10-06 15:03:05 -0400
commit8e3c03e1549c40524165afba16d093a8da81ae1d (patch)
tree6210057fb1be05cd376336552f74844d0b8c52cb
parentMerge pull request #441 from python-discord/add-role-info-command (diff)
parentMerge branch 'master' into doc-fix (diff)
Merge pull request #492 from python-discord/doc-fix
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: