Fixed opus error check

Fixes #1056
This commit is contained in:
Daniel 2018-02-06 11:19:42 -05:00 committed by GitHub
parent 881e598a6f
commit d53c3a6c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.