Commit 7c980e50 authored by Aurel's avatar Aurel

remove the getattr as a connector must implement everything explicitely

add close method


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@394 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent feb5e9d0
...@@ -44,10 +44,6 @@ class SocketConnector: ...@@ -44,10 +44,6 @@ class SocketConnector:
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
else: else:
self.socket = s self.socket = s
def __getattr__(self, name):
""" fallback to default socket methods """
return getattr(self.socket, name)
def makeClientConnection(self, addr): def makeClientConnection(self, addr):
try: try:
...@@ -115,6 +111,9 @@ class SocketConnector: ...@@ -115,6 +111,9 @@ class SocketConnector:
logging.error('send: %s', m[1]) logging.error('send: %s', m[1])
raise raise
def close(self):
return self.socket.close()
registerConnectorHandler(SocketConnector) registerConnectorHandler(SocketConnector)
class ConnectorTryAgainException(Exception): pass class ConnectorTryAgainException(Exception): pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment