Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@claudep claudep authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/mail/backends/smtp.py
View
4 django/core/mail/backends/smtp.py
@@ -1,6 +1,6 @@
"""SMTP email backend class."""
import smtplib
-import socket
+import ssl
import threading
from django.conf import settings
@@ -65,7 +65,7 @@ def close(self):
try:
try:
self.connection.quit()
- except (socket.sslerror, smtplib.SMTPServerDisconnected):
+ except (ssl.SSLError, smtplib.SMTPServerDisconnected):
# This happens when calling quit() on a TLS connection
# sometimes, or when the connection was already disconnected
# by the server.
Please sign in to comment.
Something went wrong with that request. Please try again.