Do not fail when talker key is missing

This commit is contained in:
Mizaki 2023-03-03 00:07:49 +00:00
parent 428879120a
commit 271bfac834

View File

@ -130,7 +130,7 @@ class ComicTalker:
settings is a dictionary of settings defined in register_settings.
It is only guaranteed that the settings defined in register_settings will be present.
"""
if settings[f"{self.id}_key"]:
if settings.get(f"{self.id}_key"):
self.api_key = settings[f"{self.id}_key"]
if settings[f"{self.id}_url"]:
self.api_url = fix_url(settings[f"{self.id}_url"])