From 1047597448bd4b7c89286df79f95ad1edcd4583a Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 10 May 2021 18:08:31 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 87ce7ecfe..682de9f95 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -8,6 +8,7 @@ import subprocess import re import json + # reload(sys) # sys.setdefaultencoding('utf-8') @@ -15,6 +16,13 @@ sys.path.append(os.getcwd() + "/class/core") import mw +if mw.isAppleSystem(): + cmd = 'ls /usr/local/lib/ | grep python | cut -d \\ -f 1 | awk \'END {print}\'' + info = mw.execShell(cmd) + p = "/usr/local/lib/" + info[0].strip() + "/site-packages" + sys.path.append(p) + + app_debug = False if mw.isAppleSystem(): app_debug = True @@ -521,6 +529,7 @@ def runInfo(): result = {} # print(data) + for d in data: for g in gets: if d[0] == g: