mirror of https://github.com/python/cpython
Fix import of HTTPError (GH-22304)
Import HTTPError from urllib.error instead of urllib.request.
This commit is contained in:
parent
23ae2c3bac
commit
5fedf71439
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue