Handle missing http_cache from config
MODIFY
plextraktsync/config/Config.py
plextraktsync/config/Config.py
@@ -66,7 +66,9 @@ def cache_path(self):
def http_cache(self):
from plextraktsync.config.HttpCacheConfig import HttpCacheConfig
- return HttpCacheConfig(**self["http_cache"])
+ cache = self["http_cache"] if "http_cache" in self else {"policy": {}}
+
+ return HttpCacheConfig(**cache)
def initialize(self):
"""

Handle missing http_cache from config