From 8bb46df983be6b755094fa841b53cea1d2bcbfbb Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 14 Jul 2022 16:21:14 +0800 Subject: [PATCH] Update index.py --- plugins/gogs/index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)