You've already forked HeurAMS-legacy
fix: 改进
This commit is contained in:
@@ -18,9 +18,11 @@ import heurams.services.version as version
|
||||
import heurams.services.timer as timer
|
||||
from .preparation import PreparationScreen
|
||||
from .about import AboutScreen
|
||||
from heurams.services.logger import get_logger
|
||||
|
||||
import pathlib
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
class DashboardScreen(Screen):
|
||||
|
||||
@@ -53,6 +55,9 @@ class DashboardScreen(Screen):
|
||||
electron_file_path = pathlib.Path(config_var.get()["paths"]["electron_dir"]) / (
|
||||
filestem + ".json"
|
||||
)
|
||||
|
||||
logger.debug(f"电子文件路径: {electron_file_path}")
|
||||
|
||||
if electron_file_path.exists(): # 未找到则创建电子文件 (json)
|
||||
pass
|
||||
else:
|
||||
@@ -60,6 +65,7 @@ class DashboardScreen(Screen):
|
||||
with open(electron_file_path, "w") as f:
|
||||
f.write("{}")
|
||||
electron_dict = load_electron(path=electron_file_path) # TODO: 取消硬编码扩展名
|
||||
logger.debug(electron_dict)
|
||||
is_due = 0
|
||||
is_activated = 0
|
||||
nextdate = 0x3F3F3F3F
|
||||
|
||||
Reference in New Issue
Block a user