mirror of
https://github.com/maubot/maubot.git
synced 2024-10-01 01:06:10 -04:00
Don't throw error if CLI config is missing keys
This commit is contained in:
parent
6b5dedb29f
commit
98eeb6a808
@ -70,8 +70,8 @@ def load_config() -> None:
|
||||
try:
|
||||
with open(f"{configdir}/maubot-cli.json") as file:
|
||||
loaded = json.load(file)
|
||||
config["servers"] = loaded["servers"]
|
||||
config["aliases"] = loaded["aliases"]
|
||||
config["default_server"] = loaded["default_server"]
|
||||
config["servers"] = loaded.get("servers", {})
|
||||
config["aliases"] = loaded.get("aliases", {})
|
||||
config["default_server"] = loaded.get("default_server", None)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user