Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyu6 committed Jun 5, 2024
1 parent 879ce72 commit ced0a00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fancontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
def main():
# 从配置文件中读取数据
with open('fan_settings.json', 'r') as file:
data = json.load(file)
try:
data = json.load(file)
except json.JSONDecodeError:
input("错误:文件内容不是有效的JSON格式,请检查配置后重新打开,输入任意键退出程序:")

servers = data['servers']
windows_ipmi_tool_path = data['windows_ipmi_tool_path']
Expand Down

0 comments on commit ced0a00

Please sign in to comment.