Skip to content

Commit 2ca4605

Browse files
authored
build: migrate urllib to python3 (electron#33737)
1 parent 3057ff0 commit 2ca4605

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

script/release/uploaders/upload-index-json.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55
import os
66
import sys
7-
import urllib2
7+
from urllib.request import Request, urlopen
88

99
sys.path.append(
1010
os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../.."))
@@ -28,12 +28,12 @@ def is_json(myjson):
2828

2929
def get_content(retry_count = 5):
3030
try:
31-
request = urllib2.Request(
31+
request = Request(
3232
BASE_URL + version,
3333
headers={"Authorization" : authToken}
3434
)
3535

36-
proposed_content = urllib2.urlopen(
36+
proposed_content = urlopen(
3737
request
3838
).read()
3939

0 commit comments

Comments
 (0)