urllib.error import (manual)

This commit is contained in:
un-pogaz 2025-11-17 09:55:07 +01:00
parent 58ee94a2af
commit 7762bd97df
2 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import subprocess
import time
from collections import namedtuple
from http.cookiejar import CookieJar
from urllib.error import HTTPError
from calibre.constants import ismacos
from calibre.ptempfile import TemporaryDirectory
@ -19,7 +20,7 @@ from calibre.srv.routes import Router, endpoint
from calibre.srv.tests.base import BaseTest, TestServer
from polyglot.binary import as_base64_bytes
from polyglot.builtins import itervalues
from polyglot.urllib import HTTPBasicAuthHandler, HTTPCookieProcessor, HTTPDigestAuthHandler, HTTPError, build_opener
from polyglot.urllib import HTTPBasicAuthHandler, HTTPCookieProcessor, HTTPDigestAuthHandler, build_opener
REALM = 'calibre-test'
is_ci = os.environ.get('CI', '').lower() == 'true'

View File

@ -19,6 +19,7 @@ import time
import traceback
from base64 import standard_b64decode
from http.client import responses
from urllib.error import URLError
from urllib.request import urlopen
from calibre import browser, relpath, unicode_path
@ -31,7 +32,7 @@ from calibre.utils.imghdr import what
from calibre.utils.localization import _
from calibre.utils.logging import Log
from calibre.web.fetch.utils import rescale_image
from polyglot.urllib import URLError, quote, url2pathname, urljoin, urlparse, urlsplit, urlunparse, urlunsplit
from polyglot.urllib import quote, url2pathname, urljoin, urlparse, urlsplit, urlunparse, urlunsplit
class AbortArticle(Exception):