Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _load_file(self):
"""加载并解析 YAML 文件"""
try:
with open(self.file_path, 'r', encoding='utf-8') as f:
self.data = yaml.safe_load(f)
self.data = yaml.load(f, Loader=yaml.BaseLoader)
except FileNotFoundError:
raise FileNotFoundError(f"File {self.file_path} Not Found")
except yaml.YAMLError as e:
Expand Down Expand Up @@ -54,7 +54,7 @@ def _parse_data(self):
for schedule in schedules_data:
schedule_info = {
'name': schedule['name'],
'enable_day': schedule['enable_day'],
'enable_day': int(schedule['enable_day']),
'weeks': schedule['weeks'],
'classes': []
}
Expand Down