mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: migrate urllib to python3 (#33744)
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user