mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-09 09:27:26 +08:00
fix duplicate monkey patch
This commit is contained in:
@@ -2,7 +2,12 @@
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# monkey patch at beginning to avoid RecursionError when running locust.
|
# 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:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user