aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/opus.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/opus.py b/discord/opus.py
index 788c953e..6003ca7c 100644
--- a/discord/opus.py
+++ b/discord/opus.py
@@ -49,9 +49,10 @@ def _err_lt(result, func, args):
return result
def _err_ne(result, func, args):
- if result.value != 0:
+ ret = args[-1]._obj
+ if ret.value != 0:
log.info('error has happened in {0.__name__}'.format(func))
- raise OpusError(result.value)
+ raise OpusError(ret.value)
return result
# A list of exported functions.