pull/649/head
Mr Chen 5 months ago
parent e8a99af37f
commit 215e053b6d
  1. 7
      plugins/gdrive/class/gdriveclient.py
  2. 11
      plugins/gdrive/index.py

@ -8,7 +8,6 @@ import re
import json
import io
web_dir = os.getcwd() + "/web"
if os.path.exists(web_dir):
sys.path.append(web_dir)
@ -16,6 +15,12 @@ if os.path.exists(web_dir):
import core.mw as mw
gd_dir = mw.getServerDir() +'/gdrive/lib'
cmd = 'ls '+gd_dir+' | grep python | cut -d \\ -f 1 | awk \'END {print}\''
info = mw.execShell(cmd)
p = gd_dir +'/'+ info[0].strip() + "/site-packages"
sys.path.append(p)
# -----------------------------
import google.oauth2.credentials
import google_auth_oauthlib.flow

@ -12,7 +12,6 @@ import json
if sys.platform != "darwin":
os.chdir("/www/server/mdserver-web")
web_dir = os.getcwd() + "/web"
if os.path.exists(web_dir):
sys.path.append(web_dir)
@ -21,16 +20,6 @@ if os.path.exists(web_dir):
import core.mw as mw
import core.db as db
_ver = sys.version_info
is_py2 = (_ver[0] == 2)
is_py3 = (_ver[0] == 3)
DEBUG = False
if is_py2:
reload(sys)
sys.setdefaultencoding('utf-8')
app_debug = False
if mw.isAppleSystem():
app_debug = True

Loading…
Cancel
Save