Author: andar
Revision: 5266
Log:
Fix exception when timing out trying to send notification email
Diff:
Modified: branches/1.1.0_RC/ChangeLog
===================================================================
--- branches/1.1.0_RC/ChangeLog 2009-05-12 20:22:21 UTC (rev 5265)
+++ branches/1.1.0_RC/ChangeLog 2009-05-13 20:52:51 UTC (rev 5266)
@@ -7,6 +7,7 @@
* Fix high cpu usage when displaying speeds in titlebar
* Fix showing non-utf8 encoded torrents in add torrent dialog -- this adds
an additional dependency on chardet.
+ * Fix exception when timing out trying to send notification email
==== WebUI ====
* Fix starting when -l option is used
Modified: branches/1.1.0_RC/deluge/ui/gtkui/notification.py
===================================================================
--- branches/1.1.0_RC/deluge/ui/gtkui/notification.py 2009-05-12 20:22:21 UTC
(rev 5265)
+++ branches/1.1.0_RC/deluge/ui/gtkui/notification.py 2009-05-13 20:52:51 UTC
(rev 5266)
@@ -115,7 +115,12 @@
port = 587
elif self.config["ntf_security"] == None:
port = 25
- mailServer = smtplib.SMTP(self.config["ntf_server"], port)
+ try:
+ mailServer = smtplib.SMTP(self.config["ntf_server"], port)
+ except Exception, e:
+ log.error("There was an error sending the notification email: %s",
e)
+ return
+
if self.config["ntf_username"] and self.config["ntf_pass"]:
if self.config["ntf_security"] == 'SSL' or 'TLS':
mailServer.ehlo('x')
Modified: trunk/deluge/ui/gtkui/notification.py
===================================================================
--- trunk/deluge/ui/gtkui/notification.py 2009-05-12 20:22:21 UTC (rev
5265)
+++ trunk/deluge/ui/gtkui/notification.py 2009-05-13 20:52:51 UTC (rev
5266)
@@ -103,7 +103,12 @@
port = 587
elif self.config["ntf_security"] == None:
port = 25
- mailServer = smtplib.SMTP(self.config["ntf_server"], port)
+ try:
+ mailServer = smtplib.SMTP(self.config["ntf_server"], port)
+ except Exception, e:
+ log.error("There was an error sending the notification email: %s",
e)
+ return
+
if self.config["ntf_username"] and self.config["ntf_pass"]:
if self.config["ntf_security"] == 'SSL' or 'TLS':
mailServer.ehlo('x')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---