Skip to content

Commit

Permalink
fix upload bug - upload files wven when analysis fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ytonui committed Sep 6, 2021
1 parent 7517d84 commit 29b306d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions amira/amira.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,11 @@ def _process_created_object(self, created_object):
forensic_output = self._s3_handler.get_contents_as_string(
created_object.bucket_name, created_object.key_name,
)
processed_input = self._data_processor.process_input(forensic_output)

if not processed_input:
logging.error('No input to process')
return

try:
self._data_processor.perform_analysis(processed_input, self._data_feeds)
processed_input = self._data_processor.process_input(forensic_output)
if processed_input:
self._data_processor.perform_analysis(processed_input, self._data_feeds)
except Exception as exc:
# Log the exception and do not try any recovery.
# The message that caused the exception will be deleted from the
Expand Down

0 comments on commit 29b306d

Please sign in to comment.