Skip to content

Commit 6560040

Browse files
committed
Handle email server being unavailable when sending notifications.
1 parent 8985a70 commit 6560040

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

code_comments/notification.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ def notify(self, comment):
158158
projname = self.config.get("project", "name")
159159
subject = "Re: [%s] %s" % (projname, comment.link_text())
160160

161-
NotifyEmail.notify(self, comment, subject)
161+
try:
162+
NotifyEmail.notify(self, comment, subject)
163+
except Exception, e:
164+
self.env.log.error("Failure sending notification on creation of "
165+
"comment #%d: %s", comment.id, e)
162166

163167
def send(self, torcpts, ccrcpts):
164168
"""

0 commit comments

Comments
 (0)