Skip to content
Snippets Groups Projects
Commit 3a1384d7 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

FIX: Raise NotImplementedError at correct position

parent f0a56809
No related branches found
No related tags found
2 merge requests!217TST: Make NamedTemporaryFiles Windows-compatible,!208ENH: Allow crawler_main to operate on a list of paths
Pipeline #58678 passed
......@@ -661,6 +661,12 @@ one with the entities that need to be updated and the other with entities to be
"use for example the Scanner to create this data."))
crawled_data = self.crawled_data
if isinstance(path_for_authorized_run, list) and self.securityMode != SecurityMode.UPDATE:
raise NotImplementedError(
"Authorization of inserts and updates is currently implemented only "
"for single paths, not for lists of paths."
)
to_be_inserted, to_be_updated = self._split_into_inserts_and_updates(
SyncGraph(crawled_data, self.identifiableAdapter))
......@@ -718,21 +724,11 @@ one with the entities that need to be updated and the other with entities to be
update_cache = UpdateCache()
pending_inserts = update_cache.get_inserts(self.run_id)
if pending_inserts:
if isinstance(path_for_authorized_run, list):
raise NotImplementedError(
"Authorization of inserts is currently implemented only for single paths, "
"not for lists of paths."
)
Crawler.inform_about_pending_changes(
pending_inserts, self.run_id, path_for_authorized_run)
pending_updates = update_cache.get_updates(self.run_id)
if pending_updates:
if isinstance(path_for_authorized_run, list):
raise NotImplementedError(
"Authorization of updates is currently implemented only for single paths, "
"not for lists of paths."
)
Crawler.inform_about_pending_changes(
pending_updates, self.run_id, path_for_authorized_run)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment