diff --git a/wpull/network/connection.py b/wpull/network/connection.py index dcbaacdf..bfedf2b9 100644 --- a/wpull/network/connection.py +++ b/wpull/network/connection.py @@ -10,7 +10,6 @@ import ssl import tornado.netutil -from tornado.netutil import SSLCertificateError from typing import Optional, Union from wpull.backport.logging import BraceMessage as __ from wpull.errors import NetworkError, ConnectionRefused, SSLVerificationError, \ @@ -305,7 +304,7 @@ def run_network_operation(self, task, wait_timeout=None, self.close() raise NetworkTimedOut( '{name} timed out.'.format(name=name)) from error - except (tornado.netutil.SSLCertificateError, SSLVerificationError) \ + except (ssl.CertificateError, SSLVerificationError) \ as error: self.close() raise SSLVerificationError(