Improve readability of VT100 host output handler

This commit is contained in:
Andrew Kay
2019-06-21 08:06:26 -05:00
parent e5a163bf84
commit 9cd1603570

View File

@@ -107,14 +107,14 @@ class VT100Session(Session):
def handle_host(self):
try:
if self.host_process in select([self.host_process], [], [], 0)[0]:
data = self.host_process.read()
if self.host_process not in select([self.host_process], [], [], 0)[0]:
return False
self._handle_host_output(data)
data = self.host_process.read()
return True
self._handle_host_output(data)
return False
return True
except EOFError:
self.host_process = None