summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2009-05-13 20:52:51 +0000
committerAndrew Resch <andrewresch@gmail.com>2009-05-13 20:52:51 +0000
commit62a7fe4fc5bda30ca95c1f68022cd24892b888ff (patch)
tree3fc46cae996f84a79bbe70a59cfd09d9e774f5c6
parent96687a996b589baac1607e476b5760338fb3c126 (diff)
downloaddeluge-62a7fe4fc5bda30ca95c1f68022cd24892b888ff.tar.gz
deluge-62a7fe4fc5bda30ca95c1f68022cd24892b888ff.tar.bz2
deluge-62a7fe4fc5bda30ca95c1f68022cd24892b888ff.zip
Fix exception when timing out trying to send notification email
-rw-r--r--ChangeLog1
-rw-r--r--deluge/ui/gtkui/notification.py7
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 38f284c78..f66f68df1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/deluge/ui/gtkui/notification.py b/deluge/ui/gtkui/notification.py
index 34648c723..68f823480 100644
--- a/deluge/ui/gtkui/notification.py
+++ b/deluge/ui/gtkui/notification.py
@@ -115,7 +115,12 @@ class Notification:
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')