diff --git a/src/tts_tools/prefetch/__init__.py b/src/tts_tools/prefetch/__init__.py index 265bb22..5e907aa 100644 --- a/src/tts_tools/prefetch/__init__.py +++ b/src/tts_tools/prefetch/__init__.py @@ -1,3 +1,4 @@ +import http.client import os import sys import urllib.request @@ -112,6 +113,10 @@ def prefetch_file(filename, print_err("Error ({reason})".format(reason=error)) continue + except http.client.HTTPException as error: + print_err("HTTP error ({reason})".format(reason=error)) + continue + # Only for informative purposes. length = response.getheader('Content-Length', 0) length_kb = "???"