We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4a48fa commit 6a36867Copy full SHA for 6a36867
src/plamo_translate/servers/utils.py
@@ -142,7 +142,11 @@ def update_config(**kwargs) -> Dict[str, Any]:
142
)
143
else:
144
with tmp_config_path.open("r") as f:
145
- config = json.load(f)
+ try:
146
+ config = json.load(f)
147
+ except json.JSONDecodeError:
148
+ logger.warning(f"Config file {tmp_config_path} is corrupted. Recreating it.")
149
+ config = {}
150
for key, value in kwargs.items():
151
config[key] = value
152
0 commit comments