diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index c1d255575..0d8e10da3 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -178,9 +178,14 @@ def getRootUrl(): content = mw.readFile(getConf()) rep = 'ROOT_URL\s*=\s*(.*)' tmp = re.search(rep, content) - if not tmp: - return '' - return tmp.groups()[0] + if tmp: + return tmp.groups()[0] + + rep = 'EXTERNAL_URL\s*=\s*(.*)' + tmp = re.search(rep, content) + if tmp: + return tmp.groups()[0] + return '' def getSshPort():