aboutsummaryrefslogtreecommitdiff
path: root/discord/oggparse.py
diff options
context:
space:
mode:
authorrkevin <[email protected]>2019-11-05 01:26:20 -0800
committerRapptz <[email protected]>2019-11-19 21:06:28 -0500
commit51b314331976dcc0d56db72bdf68c14e80000cc9 (patch)
tree91c45c00d8289b8d8c0f15a3a496856b7275a20a /discord/oggparse.py
parentUpdate regex to fetch URLs to match the official client. (diff)
downloaddiscord.py-51b314331976dcc0d56db72bdf68c14e80000cc9.tar.xz
discord.py-51b314331976dcc0d56db72bdf68c14e80000cc9.zip
Fix OggStream "invalid header magic" at end of stream
Diffstat (limited to 'discord/oggparse.py')
-rw-r--r--discord/oggparse.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/oggparse.py b/discord/oggparse.py
index 6f50502f..15db4595 100644
--- a/discord/oggparse.py
+++ b/discord/oggparse.py
@@ -77,6 +77,8 @@ class OggStream:
head = self.stream.read(4)
if head == b'OggS':
return OggPage(self.stream)
+ elif not head:
+ return None
else:
raise OggError('invalid header magic')