Skip to content

Commit

Permalink
#1162 fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Feb 14, 2023
1 parent 91510e1 commit 36ef849
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions analyzers/EmlParser/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def __init__(self):

def run(self):
if self.data_type == 'file':
try:
parsingResult = parseEml(
self.filepath, self.job_directory, self.wkhtmltoimage, self.sanitized_rendering)
self.report(parsingResult)
except Exception as e:
# try:
parsingResult = parseEml(
self.filepath, self.job_directory, self.wkhtmltoimage, self.sanitized_rendering)
self.report(parsingResult)
# except Exception as e:
# self.unexpectedError(e)
print(e)
# print(e)

else:
self.notSupported()
Expand Down Expand Up @@ -145,7 +145,7 @@ def parseEml(filepath, job_directory, wkhtmltoimage, sanitized_rendering):
headers['bcc'] = decoded_email.get('header').get('header').get('bcc', [])
headers['reply-to'] = decoded_email.get('header').get('header').get('reply-to', [])
headers['subject'] = decoded_email.get('header').get('header').get('subject', '')
headers['date'] = decoded_email.get('header').get('header').get('date', '')[0]
headers['date'] = decoded_email.get('header').get('header').get('date', [''])[0]
headers['received'] = decoded_email.get('header').get('received')
# Make dates ready for json
for h in headers['received']:
Expand Down

0 comments on commit 36ef849

Please sign in to comment.