diff --git a/plugins/manticoresearch/class/sphinx_make.py b/plugins/manticoresearch/class/sphinx_make.py index 0ccb1f409..239064fc5 100644 --- a/plugins/manticoresearch/class/sphinx_make.py +++ b/plugins/manticoresearch/class/sphinx_make.py @@ -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()