1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[downloader:http] try to import SSL exception class from OpenSSL

(#324)
This commit is contained in:
Mike Fährmann 2019-07-01 20:10:26 +02:00
parent bc6b0cfddc
commit 8966930c5c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -12,10 +12,14 @@ import os
import time
import mimetypes
from requests.exceptions import RequestException, ConnectionError, Timeout
from ssl import SSLError
from .common import DownloaderBase
from .. import text
try:
from OpenSSL.SSL import Error as SSLError
except ImportError:
from ssl import SSLError
class HttpDownloader(DownloaderBase):
scheme = "http"