Skip to content

Commit

Permalink
chore: guard email sending so app can continue
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed Sep 9, 2021
1 parent 5581d97 commit 846786d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/forklift/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,13 @@ def _send_report_email(template, report_object, subject, include_packing_slip=Fa
packing_slip = join(config.get_config_prop('dropoffLocation'), packing_slip_file)
attachments.append(packing_slip)

send_email(config.get_config_prop('notify'),
try:
send_email(config.get_config_prop('notify'),
'Forklift {} Report for {}'.format(subject, report_object['hostname']),
email_content,
attachments)
except Exception as e:
log.error('error sending email: %s', e, exc_info=True)

return email_content

Expand Down

0 comments on commit 846786d

Please sign in to comment.