diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index 82f4e18d9..76b8edb3a 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -216,8 +216,11 @@ def getRootPath(): def getDbConfValue(): - content = mw.readFile(getConf()) + conf = getConf() + if not os.path.exists(conf): + return {} + content = mw.readFile(conf) rep_scope = "\[database\](.*?)\[" tmp = re.findall(rep_scope, content, re.S)