build: migrate urllib to python3 (#33744)

Co-authored-by: VerteDinde <vertedinde@electronjs.org>
This commit is contained in:
trop[bot]
2022-04-12 16:58:01 -07:00
committed by GitHub
parent 3232650535
commit f70bc4de62
2 changed files with 4 additions and 4 deletions

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()

View File

@@ -81,7 +81,7 @@ def main():
shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip)
upload_electron(release, symbols_zip, args)
if PLATFORM == 'darwin':
if get_platform_key() == 'darwin' and get_target_arch() == 'x64':
if get_platform_key() == 'darwin' or get_target_arch() == 'x64':
api_path = os.path.join(ELECTRON_DIR, 'electron-api.json')
upload_electron(release, api_path, args)