()
| 229 | |
| 230 | |
| 231 | def load_config_file(): |
| 232 | config = load_json(CONFIG_PATH, {"data_dir": [], "users": []}) |
| 233 | config = ensure_config_defaults(config) |
| 234 | config = merge_detected_accounts(config) |
| 235 | try: |
| 236 | save_json(CONFIG_PATH, config) |
| 237 | except Exception: |
| 238 | logging.exception("写入配置默认值失败") |
| 239 | return config |
| 240 | |
| 241 | |
| 242 | def merge_detected_accounts(config): |
no test coverage detected