Update index.py

pull/109/head
midoks 3 years ago
parent 9ecde715e1
commit 20587a9dd0
  1. 11
      plugins/gogs/index.py

@ -178,9 +178,14 @@ def getRootUrl():
content = mw.readFile(getConf()) content = mw.readFile(getConf())
rep = 'ROOT_URL\s*=\s*(.*)' rep = 'ROOT_URL\s*=\s*(.*)'
tmp = re.search(rep, content) tmp = re.search(rep, content)
if not tmp: if tmp:
return '' return tmp.groups()[0]
return tmp.groups()[0]
rep = 'EXTERNAL_URL\s*=\s*(.*)'
tmp = re.search(rep, content)
if tmp:
return tmp.groups()[0]
return ''
def getSshPort(): def getSshPort():

Loading…
Cancel
Save