mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-25 02:10:24 +08:00
fix: check if locustio installed
This commit is contained in:
@@ -2,6 +2,7 @@ try:
|
||||
# monkey patch ssl at beginning to avoid RecursionError when running locust.
|
||||
from gevent import monkey
|
||||
monkey.patch_ssl()
|
||||
from locust import main as locust_main
|
||||
except ImportError:
|
||||
msg = """
|
||||
Locust is not installed, install first and try again.
|
||||
@@ -61,8 +62,7 @@ def gen_locustfile(testcase_file_path):
|
||||
|
||||
|
||||
def start_locust_main():
|
||||
from locust.main import main
|
||||
main()
|
||||
locust_main.main()
|
||||
|
||||
|
||||
def start_master(sys_argv):
|
||||
|
||||
Reference in New Issue
Block a user