Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
Fix faulty syntax which was reasult of faulty merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Zaremba committed Jul 4, 2019
1 parent b64098f commit af91712
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zmon_worker_monitor/zmon_worker/notifications/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def notify(cls, alert, *args, **kwargs):
is_protected = True # localhost is fine
s = smtplib.SMTP(mail_host, mail_port)

except Exception, e:
except Exception as e:
current_span.set_tag('error', True)
logger.exception('Error connecting to SMTP server %s for alert %s with id %s: %s',
mail_host, alert_def['name'], alert_def['id'], str(e))
Expand All @@ -167,7 +167,7 @@ def notify(cls, alert, *args, **kwargs):
logger.exception(
'Error sending email for alert %s with id %s: authentication failed for %s',
alert_def['name'], alert_def['id'], mail_user)
except Exception, e:
except Exception as e:
current_span.set_tag('error', True)
current_span.log_kv({'exception': traceback.format_exc()})
logger.exception(
Expand Down

0 comments on commit af91712

Please sign in to comment.