Browse Source

Fix Py3 warning in OpusEncoder

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

4
disco/voice/opus.py

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

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