mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-25 20:29:23 +01:00
Socket: Remove misleading error fallback for Python <3.4.
We no longer support this Python version. Fixes GH-1412.
This commit is contained in:
parent
b4df468b3a
commit
d56e8ef73d
@ -412,9 +412,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
trusted_fingerprints=network_config.ssl.serverFingerprints(),
|
||||
ca_file=network_config.ssl.authorityCertificate(),
|
||||
)
|
||||
except getattr(ssl, 'CertificateError', None) as e:
|
||||
# Default to None for old Python version, which do not have
|
||||
# CertificateError
|
||||
except ssl.CertificateError as e:
|
||||
drivers.log.error(('Certificate validation failed when '
|
||||
'connecting to %s: %s\n'
|
||||
'This means either someone is doing a man-in-the-middle '
|
||||
@ -423,15 +421,6 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
% (self.irc.network, e.args[0]))
|
||||
raise ssl.SSLError('Aborting because of failed certificate '
|
||||
'verification.')
|
||||
except ssl.SSLError as e:
|
||||
drivers.log.error(('Certificate validation failed when '
|
||||
'connecting to %s: %s\n'
|
||||
'This means either someone is doing a man-in-the-middle '
|
||||
'attack on your connection, or the server\'s '
|
||||
'certificate is not trusted.')
|
||||
% (self.irc.network, e.args[1]))
|
||||
raise ssl.SSLError('Aborting because of failed certificate '
|
||||
'verification.')
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user