google / turbinia

Automation and Scaling of Digital Forensics Tools
Apache License 2.0
750 stars 163 forks source link

declare artifact_content variable to avoid reference before assignmen… #1554

Closed sa3eed3ed closed 1 month ago

sa3eed3ed commented 1 month ago

…t in case of exception

in case the content is not UTF-8 encoded an exception will be raised and artifact_content will never be assigned, this cause the task to fail with a misleading exception: [local variable 'artifact_content' referenced before assignment], while it should be Artifact {evidence.artifact_name} has empty content or not UTF-8 encoded

Description of the change

Applicable issues

Additional information

Checklist