Fixed second-thread importing of select module. Also slight patcher fix.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import select
|
||||
import sys
|
||||
import threading
|
||||
_threadlocal = threading.local()
|
||||
@@ -29,7 +30,6 @@ def get_default_hub():
|
||||
import eventlet.hubs.epolls
|
||||
return eventlet.hubs.epolls
|
||||
except ImportError:
|
||||
import select
|
||||
if hasattr(select, 'poll'):
|
||||
import eventlet.hubs.poll
|
||||
return eventlet.hubs.poll
|
||||
|
@@ -60,5 +60,7 @@ def patch_function(func, *additional_modules):
|
||||
for name, mod in additional_modules:
|
||||
if saved[name] is not None:
|
||||
sys.modules[name] = saved[name]
|
||||
else:
|
||||
del sys.modules[name]
|
||||
return patched
|
||||
|
Reference in New Issue
Block a user