Ver código fonte

[downloader/http] Properly handle missing message in SSLError (closes #26646)

master
Sergey M․ 3 anos atrás
pai
commit
c5764b3f89
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 2C393E0F18A9236D
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      youtube_dl/downloader/http.py

+ 1
- 1
youtube_dl/downloader/http.py Ver arquivo

@@ -241,7 +241,7 @@ class HttpFD(FileDownloader):
except socket.error as e:
# SSLError on python 2 (inherits socket.error) may have
# no errno set but this error message
if e.errno in (errno.ECONNRESET, errno.ETIMEDOUT) or getattr(e, 'message') == 'The read operation timed out':
if e.errno in (errno.ECONNRESET, errno.ETIMEDOUT) or getattr(e, 'message', None) == 'The read operation timed out':
retry(e)
raise



Carregando…
Cancelar
Salvar