From 5dd2d1059249bf539920ab3d1abd3cdff0c73f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Wed, 3 May 2023 14:30:42 +0200 Subject: [PATCH] deal with nonexisting files --- src/caoscrawler/crawl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index d95af7f0..cf171e70 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -574,7 +574,10 @@ class Crawler(object): del flat[i] # 2. Can it be identified via a path? elif record.path is not None: - existing = cached_get_entity_by(path=record.path) + try: + existing = cached_get_entity_by(path=record.path) + except EmptyUniqueQueryError: + existing = None if existing is None: to_be_inserted.append(record) self.add_to_remote_missing_cache(record, identifiable) -- GitLab