From dcc7b5987688dadaee524cdb8992c90cda15a4bd Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Fri, 19 Feb 2010 21:31:40 -0800 Subject: [PATCH] Fixed fragile thread-patching code (as redundant as that may sound). --- eventlet/green/threading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eventlet/green/threading.py b/eventlet/green/threading.py index 106f7d9..b2ce428 100644 --- a/eventlet/green/threading.py +++ b/eventlet/green/threading.py @@ -17,7 +17,7 @@ def _patch_main_thread(mod): # then the main thread will have the wrong key in therading._active, # so, we try and replace that key with the correct one here # this works best if there are no other threads besides the main one - curthread = mod._active.pop(mod.current_thread()._Thread__ident, None) + curthread = mod._active.pop(mod._get_ident(), None) if curthread: mod._active[thread.get_ident()] = curthread