Handle missing http_cache from config
@@ -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):
"""
