# HG changeset patch # User Dennis Fink # Date 2014-07-15 19:48:56 # Node ID dcff662d5fd105af97700d57558ada9793012dfd # Parent b157f1d9a150bf78ebd2a2214a91f2def7d38da7 Don't send mail if server status is already unknown and the new status is not offline diff --git a/ennstatus/status/functions.py b/ennstatus/status/functions.py --- a/ennstatus/status/functions.py +++ b/ennstatus/status/functions.py @@ -60,7 +60,8 @@ def _check_server(data): current_app.logger.error('%s is set to %s' % (server_name, status)) - _send_mail(server_name, status, last_updated) + if data['server_status'] != 'Unknown' and status != 'Offline': + _send_mail(server_name, status, last_updated) for key in ('server_status', 'tor_status'): data[key] = status