build: migrate urllib to python3 (#33742)

Co-authored-by: VerteDinde <vertedinde@electronjs.org>
This commit is contained in:
trop[bot]
2022-04-13 10:45:19 +02:00
committed by GitHub
parent 40fef39431
commit a4fd0d3351

View File

@@ -4,7 +4,7 @@ from __future__ import print_function
import json
import os
import sys
import urllib2
from urllib.request import Request, urlopen
sys.path.append(
os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../.."))
@@ -28,12 +28,12 @@ def is_json(myjson):
def get_content(retry_count = 5):
try:
request = urllib2.Request(
request = Request(
BASE_URL + version,
headers={"Authorization" : authToken}
)
proposed_content = urllib2.urlopen(
proposed_content = urlopen(
request
).read()