mirror of
https://github.com/nikdoof/python-ts3.git
synced 2025-12-13 07:22:15 +00:00
Fixed some issues with bytes vs str mismatch
This commit is contained in:
@@ -128,7 +128,7 @@ class TS3Proto():
|
||||
with self.io_lock:
|
||||
self._telnet.write(commandstr.encode('utf-8') + b"\n\r")
|
||||
|
||||
data = ''
|
||||
data = b''
|
||||
response = self._telnet.read_until(b"\n\r", self._timeout)
|
||||
|
||||
if not response.startswith(b"error"):
|
||||
@@ -136,7 +136,7 @@ class TS3Proto():
|
||||
data = response
|
||||
response = self._telnet.read_until(b"\n\r", self._timeout)
|
||||
|
||||
return TS3Response(response, data)
|
||||
return TS3Response(response.decode('utf-8'), data.decode('utf-8'))
|
||||
|
||||
def check_connection(self):
|
||||
if not self.is_connected:
|
||||
@@ -199,7 +199,6 @@ class TS3Proto():
|
||||
@param data: data string
|
||||
@type data: string
|
||||
"""
|
||||
|
||||
data = data.strip()
|
||||
|
||||
multipart = data.split('|')
|
||||
|
||||
Reference in New Issue
Block a user