From 1e4106b1800e6e8a282d6ccf2e73854faa24ad4a Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <antoine.romain.dumont@gmail.com> Date: Thu, 20 Dec 2018 00:37:47 +0100 Subject: [PATCH] journal.publisher: Filter on existing revisions revision_get can provide None revisions. --- swh/journal/publisher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swh/journal/publisher.py b/swh/journal/publisher.py index e1a1fb9..431bf23 100644 --- a/swh/journal/publisher.py +++ b/swh/journal/publisher.py @@ -176,7 +176,8 @@ class JournalPublisher(SWHConfig): def process_revisions(self, revision_objs): metadata = self.storage.revision_get((r[b'id'] for r in revision_objs)) - return [(revision['id'], revision) for revision in metadata] + return [(revision['id'], revision) + for revision in metadata if revision] def process_releases(self, release_objs): metadata = self.storage.release_get((r[b'id'] for r in release_objs)) -- GitLab