From d53c3a6c12f640519c5e4d569421a35c43978ef5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 6 Feb 2018 11:19:42 -0500 Subject: [PATCH] Fixed opus error check Fixes #1056 --- discord/opus.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/discord/opus.py b/discord/opus.py index 788c953e9..6003ca7c8 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.