Fix raised 'TypeError: must be str, not bytearray' when saving audio file in Python 3.4.3.

This commit is contained in:
Jared Contrascere
2015-09-04 01:10:35 -04:00
parent 552bca14fc
commit 92ebaee767

View File

@@ -278,5 +278,5 @@ class AudioCaptcha(object):
:param output: output destionation.
"""
data = self.generate(chars)
with open(output, 'w') as f:
with open(output, 'wb') as f:
return f.write(data)