|
@@ 1124-1133 (lines=10) @@
|
| 1121 |
|
self._base_logger.warning( |
| 1122 |
|
f"added file {file_.ID} for page {file_.pageId} in input file group {ifg} " |
| 1123 |
|
f"conflicts with file {ift[i].ID} but no PAGE available - on_error={on_error}") |
| 1124 |
|
if on_error == 'skip': |
| 1125 |
|
ift[i] = None |
| 1126 |
|
elif on_error == 'first': |
| 1127 |
|
pass # keep first match |
| 1128 |
|
elif on_error == 'last': |
| 1129 |
|
ift[i] = file_ |
| 1130 |
|
elif on_error == 'abort': |
| 1131 |
|
raise NonUniqueInputFile(ifg, file_.pageId, None) |
| 1132 |
|
else: |
| 1133 |
|
raise Exception("Unknown 'on_error' strategy '%s'" % on_error) |
| 1134 |
|
else: |
| 1135 |
|
self._base_logger.debug(f"adding file {file_.ID} for page {file_.pageId} to input file group {ifg}") |
| 1136 |
|
ift[i] = file_ |
|
@@ 1103-1112 (lines=10) @@
|
| 1100 |
|
self._base_logger.warning( |
| 1101 |
|
f"added file {file_.ID} for page {file_.pageId} in input file group {ifg} " |
| 1102 |
|
f"conflicts with file {ift[i].ID} of same MIME type {mimetype} - on_error={on_error}") |
| 1103 |
|
if on_error == 'skip': |
| 1104 |
|
ift[i] = None |
| 1105 |
|
elif on_error == 'first': |
| 1106 |
|
pass # keep first match |
| 1107 |
|
elif on_error == 'last': |
| 1108 |
|
ift[i] = file_ |
| 1109 |
|
elif on_error == 'abort': |
| 1110 |
|
raise NonUniqueInputFile(ifg, file_.pageId, mimetype) |
| 1111 |
|
else: |
| 1112 |
|
raise Exception("Unknown 'on_error' strategy '%s'" % on_error) |
| 1113 |
|
elif (ift[i].mimetype == MIMETYPE_PAGE and |
| 1114 |
|
file_.mimetype != MIMETYPE_PAGE): |
| 1115 |
|
pass # keep PAGE match |