mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-01-07 09:10:09 +01:00
fix in TCPClient
This commit is contained in:
parent
6f40095c52
commit
d87247783d
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue