You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit fb0a7d4 changed the error handling of preprocessor to only raise an exception when none of the sources were successfully pre-processed. However, the current implementation will actually raise an exception when the last source preprocessing failed:
last_exception=Noneforsourceinartifact_definition.sources:
ifsource.type_indicatornotin (
artifact_definitions.TYPE_INDICATOR_FILE,
artifact_definitions.TYPE_INDICATOR_PATH):
continueforpathinsource.paths:
find_spec=file_system_searcher.FindSpec(
case_sensitive=False, location_glob=path,
location_separator=source.separator)
forpath_specificationinsearcher.Find(find_specs=[find_spec]):
try:
self._ParsePathSpecification(
mediator, searcher, file_system, path_specification,
source.separator)
last_exception=Noneexcepterrors.PreProcessFailasexception:
last_exception=exceptioniflast_exception:
# Only raise an exception if none of the sources were successfully# pre-processed.raiselast_exception
If I'm not mistaken, the fix would be add another variable succeed set to False and mark it True instead of last_exception = None, and then check the success value at the end of the function while raising the last_exception exception.
To Reproduce:
Pre-process two sources where the first source succeed and the second fails.
Affected Version
Any version >= Plaso-20230717.
Expected behavior:
According to commit message, the method should only raise exception if all sources have failed.
Debug output/tracebacks:
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Describe the problem:
Commit fb0a7d4 changed the error handling of preprocessor to only raise an exception when none of the sources were successfully pre-processed. However, the current implementation will actually raise an exception when the last source preprocessing failed:
https://github.com/joachimmetz/plaso/blob/ebe2f69b4903ca8a3da23ac9ad9b233664425d3e/plaso/preprocessors/interface.py#L65
If I'm not mistaken, the fix would be add another variable
succeed
set toFalse
and mark itTrue
instead oflast_exception = None
, and then check the success value at the end of the function while raising thelast_exception
exception.To Reproduce:
Pre-process two sources where the first source succeed and the second fails.
Affected Version
Any version >= Plaso-20230717.
Expected behavior:
According to commit message, the method should only raise exception if all sources have failed.
Debug output/tracebacks:
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: