mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 12:41:39 +00:00
Fix ssh disconnect handling in python 3
In python 3, '' will never match b''. Just use the value as a boolean to catch either '' or b''.
This commit is contained in:
parent
3b121cdb4b
commit
81835d66be
@ -99,7 +99,7 @@ class SshShell(conapi.Console):
|
||||
def recvdata(self):
|
||||
while self.connected:
|
||||
pendingdata = self.shell.recv(8192)
|
||||
if pendingdata == '':
|
||||
if not pendingdata:
|
||||
self.datacallback(conapi.ConsoleEvent.Disconnect)
|
||||
return
|
||||
self.datacallback(pendingdata)
|
||||
|
Loading…
Reference in New Issue
Block a user