diff options
author | MaZderMind <github@mazdermind.de> | 2015-05-15 10:40:17 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-05-15 10:40:17 +0200 |
commit | 18af1394a8b732d94b48b8f13e78cfcae3e45a6e (patch) | |
tree | 277a4ed47ce1823742da57a9999b75dd1a265f22 /voctocore/lib/tcpmulticonnection.py | |
parent | 389f87470bc988a2e4c26b4ce6e23a313aafbaf0 (diff) |
Move Class-Level variables to the Instances
I should really learn python…
Diffstat (limited to 'voctocore/lib/tcpmulticonnection.py')
-rw-r--r-- | voctocore/lib/tcpmulticonnection.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/voctocore/lib/tcpmulticonnection.py b/voctocore/lib/tcpmulticonnection.py index 2ca6921..201ecde 100644 --- a/voctocore/lib/tcpmulticonnection.py +++ b/voctocore/lib/tcpmulticonnection.py @@ -5,16 +5,15 @@ from gi.repository import GObject from lib.config import Config class TCPMultiConnection(object): - log = logging.getLogger('TCPMultiConnection') - - port = None - - boundSocket = None - currentConnections = [] - - def __init__(self, port): + if not hasattr(self, 'log'): + self.log = logging.getLogger('TCPMultiConnection') + self.port = port + self.port = None + + self.boundSocket = None + self.currentConnections = [] self.log.debug('Binding to Source-Socket on [::]:%u', port) self.boundSocket = socket.socket(socket.AF_INET6) |