mirror of
https://github.com/lowobservable/oec.git
synced 2026-01-27 04:31:52 +00:00
Improve readability of VT100 host output handler
This commit is contained in:
10
oec/vt100.py
10
oec/vt100.py
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user