From e07389caaf6ea07e158479a5a797590314792916 Mon Sep 17 00:00:00 2001
From: Sebastian Noack <sebastian.noack@gmail.com>
Date: Wed, 28 Nov 2012 21:25:19 +0100
Subject: [PATCH] Don't fail when closing closed smtp backend.
---
django/core/mail/backends/smtp.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/django/core/mail/backends/smtp.py b/django/core/mail/backends/smtp.py
index 5d4bfa5..c23bdd2 100644
a
|
b
|
class EmailBackend(BaseEmailBackend):
|
59 | 59 | |
60 | 60 | def close(self): |
61 | 61 | """Closes the connection to the email server.""" |
| 62 | if self.connection is None: |
| 63 | return |
62 | 64 | try: |
63 | 65 | try: |
64 | 66 | self.connection.quit() |