mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 06:39:25 +08:00
Update sphinx_make.py
This commit is contained in:
@@ -9,8 +9,12 @@ import re
|
||||
import json
|
||||
|
||||
|
||||
sys.path.append(os.getcwd() + "/class/core")
|
||||
import mw
|
||||
web_dir = os.getcwd() + "/web"
|
||||
if os.path.exists(web_dir):
|
||||
sys.path.append(web_dir)
|
||||
os.chdir(web_dir)
|
||||
|
||||
import core.mw as mw
|
||||
|
||||
|
||||
def getServerDir():
|
||||
@@ -26,14 +30,14 @@ def getConf():
|
||||
def getDbPort():
|
||||
file = getConf()
|
||||
content = mw.readFile(file)
|
||||
rep = 'port\s*=\s*(.*)'
|
||||
rep = r'port\s*=\s*(.*)'
|
||||
tmp = re.search(rep, content)
|
||||
return tmp.groups()[0].strip()
|
||||
|
||||
def getSocketFile():
|
||||
file = getConf()
|
||||
content = mw.readFile(file)
|
||||
rep = 'socket\s*=\s*(.*)'
|
||||
rep = r'socket\s*=\s*(.*)'
|
||||
tmp = re.search(rep, content)
|
||||
return tmp.groups()[0].strip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user