Skip to content

Commit

Permalink
🐛 修复配置无 user 字段时的报错
Browse files Browse the repository at this point in the history
fix #9
  • Loading branch information
Cp0204 committed Jul 23, 2024
1 parent fb00b4a commit 78c7eee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions telecom_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def main():
print(f"⚙️ 正从 {CONFIG_PATH} 文件中读取配置")
with open(CONFIG_PATH, "r", encoding="utf-8") as file:
CONFIG_DATA = json.load(file)
if not CONFIG_DATA.get("user"):
CONFIG_DATA["user"] = {}

telecom = Telecom()

Expand Down

0 comments on commit 78c7eee

Please sign in to comment.