2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Fix python3 compatibility with termhandler

This commit is contained in:
Jarrod Johnson 2022-04-13 17:00:27 -04:00
parent 212aa5c6e2
commit c533c973b1

View File

@ -53,9 +53,12 @@ class TermHandler(object):
connection = None
try:
connection, address = self.socket.accept()
connection.sendall("confetty control v1--\n")
connection.sendall(b"confetty control v1--\n")
cmd = connection.recv(8)
if 'GETWINID' == cmd:
if b'GETWINID' == cmd:
winid = os.environ['WINDOWID']
if not isinstance(winid, bytes):
winid = winid.encode('utf8')
connection.sendall(os.environ['WINDOWID'])
connection.close()
except BaseException: