improve exc handling and tests

This commit is contained in:
Bastian Schroll 2018-09-21 14:21:33 +02:00
parent 91389a9c5b
commit 11eab418ed
4 changed files with 35 additions and 15 deletions

View file

@ -26,8 +26,7 @@ class TCPClient:
def __init__(self, timeout=3):
"""!Create a new instance
Create a new instance of an TCP Client.
And set the timeout"""
@param timeout: timout for the client in sec. (3)"""
try:
self._sock = None
self._timeout = timeout

View file

@ -75,7 +75,9 @@ class TCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
"""!TCP server class"""
def __init__(self, timeout=3):
"""!Create a new instance"""
"""!Create a new instance
@param timeout: timeout for the server in sec. (3)"""
self._server = None
self._server_thread = None
self._timeout = timeout