Opened 4 years ago

#3382 new patch

Notifications-0.3: improve smtplib.SMTP.sendmail() error logging

Reported by: Lucio Andrés Illanes Albornoz Owned by:
Priority: minor Milestone: needs verified
Component: Plugin Version: 2.0.3
Keywords: notifications Cc:


The Notifications plugin as of version 0.3 only includes the value of an smtplib.SMTPException implicitly converted to a string in the log file on error:

Apr 11 15:06:08 [REDACTED] deluged[31554]: 15:06:08 [ERROR   ][deluge_notifications.core     :160 ] There was an error sending the notification email: {}

The patch enclosed includes both the exception type inasmuch as value in the logged error to aid debugging, e.g. yielding:

Apr 11 15:19:41 [REDACTED] deluged[539]: 15:19:41 [ERROR   ][deluge_notifications.core     :162 ] There was an error sending the notification email: <class 'smtplib.SMTPRecipientsRefused'>, {} 

Attachments (1)

deluge-2.0.3+smtp_errors_Notifications_plugin.patch (868 bytes ) - added by Lucio Andrés Illanes Albornoz 4 years ago.

Download all attachments as: .zip

Change History (1)

by Lucio Andrés Illanes Albornoz, 4 years ago

Note: See TracTickets for help on using tickets.