This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push: new 95870f0 THRIFT-4892: fixed data type conflict with simultaneous usage of bytes and str (#1804) 95870f0 is described below commit 95870f06cdee04b9ec8a263f8c71597a3b95678a Author: antbofh <antb...@gmail.com> AuthorDate: Fri Jun 21 22:33:55 2019 +0300 THRIFT-4892: fixed data type conflict with simultaneous usage of bytes and str (#1804) --- lib/py/src/transport/TTransport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/py/src/transport/TTransport.py b/lib/py/src/transport/TTransport.py index d13060f..8573ba7 100644 --- a/lib/py/src/transport/TTransport.py +++ b/lib/py/src/transport/TTransport.py @@ -376,7 +376,7 @@ class TSaslClientTransport(TTransportBase, CReadableTransport): if not self.transport.isOpen(): self.transport.open() - self.send_sasl_msg(self.START, self.sasl.mechanism) + self.send_sasl_msg(self.START, bytes(self.sasl.mechanism, 'ascii')) self.send_sasl_msg(self.OK, self.sasl.process()) while True: @@ -417,7 +417,7 @@ class TSaslClientTransport(TTransportBase, CReadableTransport): def flush(self): data = self.__wbuf.getvalue() encoded = self.sasl.wrap(data) - self.transport.write(''.join((pack("!i", len(encoded)), encoded))) + self.transport.write(pack("!i", len(encoded)) + encoded) self.transport.flush() self.__wbuf = BufferIO()