Commit 8a20f072 authored by Julien Muchembled's avatar Julien Muchembled

fixup! taskdistribution: really fix lock to avoid errors with concurrent RPC calls

parent 85ffceb0
Changes Changes
======= =======
0.4.22 (2013-01-08)
-------------------
* erp5.util.taskdistribution:
- fix regression when used on Python < 2.7
0.4.21 (2013-01-07) 0.4.21 (2013-01-07)
------------------- -------------------
......
...@@ -358,8 +358,10 @@ class ServerProxy(xmlrpclib.ServerProxy): ...@@ -358,8 +358,10 @@ class ServerProxy(xmlrpclib.ServerProxy):
transport = self.__transport transport = self.__transport
def make_connection(*args, **kw): def make_connection(*args, **kw):
conn = transport.__class__.make_connection(transport, *args, **kw) conn = transport.__class__.make_connection(transport, *args, **kw)
assert hasattr(conn, 'timeout'), conn # BBB: On Python < 2.7, HTTP connection is wrapped
conn.timeout = 120 c = getattr(conn, '_conn', conn)
assert hasattr(c, 'timeout')
c.timeout = 120
return conn return conn
transport.make_connection = make_connection transport.make_connection = make_connection
self.__rpc_lock = threading.Lock() self.__rpc_lock = threading.Lock()
......
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.4.21' version = '0.4.22'
name = 'erp5.util' name = 'erp5.util'
long_description = open("README.erp5.util.txt").read() + "\n" long_description = open("README.erp5.util.txt").read() + "\n"
......
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