fix in TCPClient

This commit is contained in:
Bastian Schroll 2019-09-20 18:19:46 +02:00
parent 6f40095c52
commit d87247783d
2 changed files with 6 additions and 4 deletions

View file

@ -103,5 +103,9 @@ class TCPClient:
def isConnected(self):
"""!Property of client connected state"""
if self._sock:
return True
try:
self._sock.sendall(bytes("", "utf-8"))
return True
except AttributeError:
pass
return False

View file

@ -73,8 +73,6 @@ class ProcessManager:
self._processHandle.terminate()
while self.isRunning:
pass
else:
logging.debug("process not running: %s", self._args[0])
logging.debug("process %s returned %d", self._args[0], self._processHandle.returncode)
def readline(self):
@ -91,7 +89,7 @@ class ProcessManager:
return None
def skipLines(self, line_cnt=1):
logging.debug("Skip %d lines from output", line_cnt)
logging.debug("skip %d lines from output", line_cnt)
while line_cnt:
self.readline()
line_cnt -= 1