Commit 805274c2 authored by Vincent Pelletier's avatar Vincent Pelletier

Remove a lock on a local variable. Remove associated try/finally block.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@252 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 70f54056
...@@ -71,8 +71,6 @@ class ConnectionPool(object): ...@@ -71,8 +71,6 @@ class ConnectionPool(object):
app.local_var.node_not_ready = 0 app.local_var.node_not_ready = 0
conn = MTClientConnection(app.em, handler, addr, conn = MTClientConnection(app.em, handler, addr,
connector_handler=self.app.connector_handler) connector_handler=self.app.connector_handler)
conn.lock()
try:
if conn.getConnector() is None: if conn.getConnector() is None:
# This happens, if a connection could not be established. # This happens, if a connection could not be established.
logging.error('Connection to storage node %s failed', addr) logging.error('Connection to storage node %s failed', addr)
...@@ -86,8 +84,6 @@ class ConnectionPool(object): ...@@ -86,8 +84,6 @@ class ConnectionPool(object):
conn.addPacket(p) conn.addPacket(p)
conn.expectMessage(msg_id) conn.expectMessage(msg_id)
app.dispatcher.register(conn, msg_id, app.getQueue()) app.dispatcher.register(conn, msg_id, app.getQueue())
finally:
conn.unlock()
try: try:
app._waitMessage(conn, msg_id) app._waitMessage(conn, msg_id)
......
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