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: