From 8b93cb4a59179c10cd64b19fabdf460e52557b2f Mon Sep 17 00:00:00 2001 From: meeb Date: Thu, 18 Feb 2021 14:55:40 +1100 Subject: [PATCH] handle malformed responses passively --- tubesync/sync/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 125055d..be3e9ee 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -453,6 +453,8 @@ class Source(models.Model): if not callable(indexer): raise Exception(f'Source type f"{self.source_type}" has no indexer') response = indexer(self.index_url) + if not isinstance(response, dict): + return [] return response.get('entries', [])