exc_tracker: also check for smtp_server before doing heavy lifting of exception email sending
This commit is contained in:
parent
607d8b3d7a
commit
c2c4e3a09b
1 changed files with 2 additions and 0 deletions
|
|
@ -95,6 +95,8 @@ def _store_exception(exc_id, exc_type_name, exc_traceback, prefix, send_email=No
|
|||
if send_email is None:
|
||||
# NOTE(marcink): read app config unless we specify explicitly
|
||||
send_email = app.CONFIG.get('exception_tracker.send_email', False)
|
||||
mail_server = app.CONFIG.get('smtp_server') or None
|
||||
send_email = send_email and mail_server
|
||||
|
||||
if send_email:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue