patcher: green existing locks fail (Python3)
Introduced in #309, this enumeration should be over the items of the dict in order to work correctly. https://github.com/eventlet/eventlet/pull/356 https://github.com/eventlet/eventlet/pull/309
This commit is contained in:
parent
f508a7e330
commit
32e2c335fb
|
@ -372,9 +372,14 @@ def _fix_py3_rlock(old):
|
|||
new.acquire()
|
||||
gc.collect()
|
||||
for ref in gc.get_referrers(old):
|
||||
for k, v in vars(ref):
|
||||
if v == old:
|
||||
setattr(ref, k, new)
|
||||
try:
|
||||
ref_vars = vars(ref)
|
||||
except TypeError:
|
||||
pass
|
||||
else:
|
||||
for k, v in ref_vars.items():
|
||||
if v == old:
|
||||
setattr(ref, k, new)
|
||||
|
||||
|
||||
def _green_os_modules():
|
||||
|
|
Loading…
Reference in New Issue