Browse Source

Fix Py3 warning in OpusEncoder

pull/11/merge
Andrei 8 years ago
parent
commit
e357162c00
  1. 6
      disco/voice/opus.py
  2. 2
      requirements.txt

6
disco/voice/opus.py

@ -1,3 +1,4 @@
import six
import sys
import array
import ctypes
@ -142,7 +143,10 @@ class OpusEncoder(BaseOpus):
raise Exception('Failed to encode: {}'.format(ret))
# TODO: py3
return array.array('b', data[:ret]).tostring()
if six.PY3:
return array.array('b', data[:ret]).tobytes()
else:
return array.array('b', data[:ret]).tostring()
class OpusDecoder(BaseOpus):

2
requirements.txt

@ -1,5 +1,5 @@
gevent==1.2.1
holster==1.0.14
holster==1.0.15
inflection==0.3.1
requests==2.13.0
six==1.10.0

Loading…
Cancel
Save