mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-02 21:11:38 +08:00
fix duplicate monkey patch
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
|
||||
try:
|
||||
# monkey patch at beginning to avoid RecursionError when running locust.
|
||||
from gevent import monkey; monkey.patch_all()
|
||||
from gevent import monkey
|
||||
if not monkey.is_module_patched('socket'):
|
||||
print("========== monkey patch all ==========")
|
||||
monkey.patch_all()
|
||||
else:
|
||||
print("========== monkey patched ==========")
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user