Avoid KeyError if saved key is missing
MODIFY
plex_trakt_sync/config.py
plex_trakt_sync/config.py
@@ -48,7 +48,10 @@ def save(self):
with open(env_file, "w") as txt:
txt.write("# This is .env file for PlexTraktSync\n")
for key in self.env_keys:
+ if key in self:
txt.write("{}={}\n".format(key, self[key]))
+ else:
+ txt.write("{}=\n".format(key))
CONFIG = Config()

Avoid KeyError if saved key is missing