From 7c8c4d7304949dc08a70c36cb25ffe0f9de6b45c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 12 Jun 2022 16:11:36 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index f66138355..0fb7d93fb 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -378,8 +378,9 @@ def my8cmd(version, method): if method == "stop": mw.execShell(cmd) return "ok" - subprocess.run(cmd, stdout=subprocess.PIPE, shell=True, - bufsize=4096, stderr=subprocess.PIPE, timeout=5) + sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True, + bufsize=4096, stderr=subprocess.PIPE) + sub.wait(5) return 'ok' except Exception as e: print(e)