10 lines
293 B
Python
10 lines
293 B
Python
import json
|
|
import os
|
|
|
|
def load_config(config_path="config/config.json"):
|
|
"""加载配置文件"""
|
|
if not os.path.exists(config_path):
|
|
raise FileNotFoundError(f"Configuration file not found: {config_path}")
|
|
|
|
with open(config_path, "r") as f:
|
|
return json.load(f) |