mirror of
https://github.com/nasa/trick.git
synced 2025-03-11 06:54:12 +00:00
Convert string to bytes in variable_server.py for Python 3
* Method socket.sendall() expects bytes to be sent, rather than a string * Python 3 stores text strings as unicode (not ASCII) by default * Therefore, strings must be explicitly converted to bytes for Python 3 compatibility * This works for both Python 2 and Python 3 (tested on Python 2.7, Python 3.6, and Python 3.7)
This commit is contained in:
parent
b029fae692
commit
38bfdf2a54
@ -860,7 +860,7 @@ class VariableServer(object):
|
||||
self.Channel.BOTH: [self._synchronous_socket,
|
||||
self._asynchronous_socket]
|
||||
}[channel]:
|
||||
channel.sendall(command)
|
||||
channel.sendall(command.encode())
|
||||
|
||||
def readline(self, synchronous_channel=True):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user