Skip to content
Snippets Groups Projects

Draft: F converters else clause

Closed Alexander Schlemmer requested to merge f-converters-else-clause into dev
1 file
+ 6
0
Compare changes
  • Side-by-side
  • Inline
+ 6
0
@@ -1141,6 +1141,7 @@ ____________________\n""".format(i + 1, len(pending_changes)) + str(el[3]))
# This path_found variable stores wether the path given by restricted_path was found in the
# data tree
path_found = False
# at_least_one_match = False
if restricted_path is not None and len(restricted_path) == 0:
restricted_path = None
@@ -1152,6 +1153,7 @@ ____________________\n""".format(i + 1, len(pending_changes)) + str(el[3]))
if (converter.typecheck(element) and (
restricted_path is None or element.name == restricted_path[0])
and converter.match(element) is not None):
# at_least_one_match = True
path_found = True
generalStore_copy = generalStore.create_scoped_copy()
recordStore_copy = recordStore.create_scoped_copy()
@@ -1195,10 +1197,14 @@ ____________________\n""".format(i + 1, len(pending_changes)) + str(el[3]))
structure_elements_path + [element.get_name()],
converters_path + [converter.name],
restricted_path[1:] if restricted_path is not None else None)
if restricted_path and not path_found:
raise RuntimeError("A 'restricted_path' argument was given that is not contained in "
"the data tree")
# if not at_least_one_match:
# run_ELSE_converter()
# if the crawler is running out of scope, copy all records in
# the recordStore, that were created in this scope
# to the general update container.
Loading