From 7eb88d6a9215711bbdf40905d4faaf812e4b227d Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sun, 24 Nov 2024 04:43:00 +0800 Subject: [PATCH] Update tool_task.py --- plugins/webstats/tool_task.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/webstats/tool_task.py b/plugins/webstats/tool_task.py index fe9185f58..614c34ccb 100644 --- a/plugins/webstats/tool_task.py +++ b/plugins/webstats/tool_task.py @@ -6,10 +6,14 @@ import os import time import json -from utils.crontab import crontab as MwCrontab -sys.path.append(os.getcwd() + "/class/core") -import mw +web_dir = os.getcwd() + "/web" +if os.path.exists(web_dir): + sys.path.append(web_dir) + os.chdir(web_dir) + +import core.mw as mw +from utils.crontab import crontab as MwCrontab app_debug = False