修复session路径重复定义导致登录后搜索初始化失败;log.user改为顶部import
This commit is contained in:
@@ -41,6 +41,7 @@ from tkinter import (
|
||||
|
||||
from excel_reader import read_input_excel, validate_required_columns
|
||||
from field_mapping import get_defaults, get_field_mapping, get_fixed_values, get_timing_config, load_config
|
||||
from log import user as _log_user
|
||||
|
||||
# ─── 全局引擎引用 ──────────────────────────────────────────
|
||||
|
||||
@@ -74,9 +75,6 @@ def _resource_path(relative_path):
|
||||
else:
|
||||
return os.path.join(os.path.dirname(os.path.abspath(__file__)), relative_path)
|
||||
|
||||
def _get_session_path():
|
||||
return _resource_path("session.json")
|
||||
|
||||
# ─── 异步引擎后台线程 ──────────────────────────────────────
|
||||
|
||||
def _run_async(coro):
|
||||
@@ -994,7 +992,7 @@ class App:
|
||||
return await future
|
||||
|
||||
def _log_sync(self, msg):
|
||||
print(f"[{datetime.now().strftime('%H:%M:%S')}] {msg}", file=sys.stderr, flush=True)
|
||||
_log_user(msg)
|
||||
|
||||
# ─── 入口 ──────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user