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:
parent
212aa5c6e2
commit
c533c973b1
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user