Changeset - e741e8f2b64e
[Not reviewed]
default
0 1 0
Dennis Fink - 11 years ago 2014-07-15 19:36:20
dennis.fink@c3l.lu
Catch an ignore AssertionError in mail
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
ennstatus/status/functions.py
Show inline comments
 
@@ -20,12 +20,14 @@ def _send_mail(server_name, status, last
 
        msg.add_recipient(current_app.config['SERVER_ADMINS'][server_name])
 
        msg.body = ('%s went to %s. I received the last update at %s'
 
                    % (server_name, status, last_updated))
 
        mail.send(msg)
 
    except KeyError:
 
        current_app.logger.error('Admin for %s not found!' % server_name)
 
    except AssertionError:
 
        pass
 
    except Exception as e:
 
        current_app.logger.error('Unexpected error: %s' % e,
 
                                 exc_info=True)
 
    current_app.logger.debug('Finished trying!')
 

	
 

	
0 comments (0 inline, 0 general)