diff options
| author | 2024-12-22 05:45:25 -0500 | |
|---|---|---|
| committer | 2024-12-22 05:45:25 -0500 | |
| commit | 68cc5921fab97c0c3609b78838f269e6883af35b (patch) | |
| tree | f427342e95ddf535e9465c5a5b87e3567a96faaf /gallery_dl/downloader/http.py | |
| parent | 2a5605e9f5348fe08b246ccd5c78c43c890c8896 (diff) | |
| parent | bb8260277ab7483652c6c1526a15d62da92acc96 (diff) | |
Update upstream source from tag 'upstream/1.28.2'
Update to upstream version '1.28.2'
with Debian dir fd5292656afeea7f61ec976dd10e1aab9da1dd13
Diffstat (limited to 'gallery_dl/downloader/http.py')
| -rw-r--r-- | gallery_dl/downloader/http.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 54750ac..c8aeef8 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -144,7 +144,16 @@ class HttpDownloader(DownloaderBase): proxies=self.proxies, verify=self.verify, ) - except (ConnectionError, Timeout) as exc: + except ConnectionError as exc: + try: + reason = exc.args[0].reason + cls = reason.__class__.__name__ + pre, _, err = str(reason.args[-1]).partition(":") + msg = "{}: {}".format(cls, (err or pre).lstrip()) + except Exception: + msg = str(exc) + continue + except Timeout as exc: msg = str(exc) continue except Exception as exc: |
