add test module
This commit is contained in:
@@ -23,7 +23,11 @@ class BoundaryStore:
|
||||
self.reload()
|
||||
|
||||
def reload(self) -> None:
|
||||
raw = json.loads(self.index_path.read_text(encoding="utf-8"))
|
||||
raw = (
|
||||
json.loads(self.index_path.read_text(encoding="utf-8"))
|
||||
if self.index_path.is_file()
|
||||
else {"videos": {}}
|
||||
)
|
||||
entries = raw.get("videos", raw)
|
||||
if not isinstance(entries, dict):
|
||||
raise ValueError("index JSON must contain a 'videos' object")
|
||||
|
||||
Reference in New Issue
Block a user