Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Replaced deprecated sslerror by ssl.SSLError

The exact conditions on which this exception is raised are not
known, but this replacement is the best guess we can do at this
point.
  • Loading branch information...
commit 850630b4b7e79b76ad9732db1be6a2aa4257893f 1 parent 6248833
Claude Paroz authored January 03, 2013

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/core/mail/backends/smtp.py
4  django/core/mail/backends/smtp.py
... ...
@@ -1,6 +1,6 @@
1 1
 """SMTP email backend class."""
2 2
 import smtplib
3  
-import socket
  3
+import ssl
4 4
 import threading
5 5
 
6 6
 from django.conf import settings
@@ -65,7 +65,7 @@ def close(self):
65 65
         try:
66 66
             try:
67 67
                 self.connection.quit()
68  
-            except (socket.sslerror, smtplib.SMTPServerDisconnected):
  68
+            except (ssl.SSLError, smtplib.SMTPServerDisconnected):
69 69
                 # This happens when calling quit() on a TLS connection
70 70
                 # sometimes, or when the connection was already disconnected
71 71
                 # by the server.

0 notes on commit 850630b

Please sign in to comment.
Something went wrong with that request. Please try again.