Fix import of HTTPError (GH-22304)

Import HTTPError from urllib.error instead of urllib.request.
This commit is contained in:
Sebastian Rittau 2021-05-12 01:01:33 +02:00 committed by GitHub
parent 23ae2c3bac
commit 5fedf71439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,8 @@ import os
import io
import hashlib
from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError
from urllib.error import HTTPError
from urllib.request import urlopen, Request
from urllib.parse import urlparse
from distutils.errors import DistutilsError, DistutilsOptionError
from distutils.core import PyPIRCCommand

View File

@ -2,7 +2,7 @@
import os
import unittest
import unittest.mock as mock
from urllib.request import HTTPError
from urllib.error import HTTPError
from test.support import run_unittest