From aa60d52662c492319d598effa24cc9135999d94d Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 11 Sep 2023 12:39:16 +0800 Subject: [PATCH 1/2] Update __init__.py --- route/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/route/__init__.py b/route/__init__.py index dd3dfda54..00fb9cbfa 100755 --- a/route/__init__.py +++ b/route/__init__.py @@ -36,6 +36,9 @@ import db import mw import config_api +import common +common.init() + app = Flask(__name__, template_folder='templates/default') app.config.version = config_api.config_api().getVersion() @@ -107,11 +110,9 @@ if mw.isDebugMode(): app.debug = True app.config.version = app.config.version + str(time.time()) -import common -common.init() - - # ---------- error function start ----------------- + + def getErrorNum(key, limit=None): key = mw.md5(key) num = cache.get(key) From f7ee3a9aed3a4733e8aa35d415da458b0ee1badd Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 11 Sep 2023 12:42:27 +0800 Subject: [PATCH 2/2] Update common.py --- class/core/common.py | 1 - 1 file changed, 1 deletion(-) diff --git a/class/core/common.py b/class/core/common.py index d750ce2b3..d730d8521 100755 --- a/class/core/common.py +++ b/class/core/common.py @@ -150,7 +150,6 @@ def initSystemControl(): path = 'data/default.db' if os.path.exists(path): return False - data_ctl = 'data/control.conf' mw.writeFile(data_ctl, '30')