Use urllib from six module in order to be compatible with Python3

This commit is contained in:
marmeladema 2019-10-14 00:36:20 +01:00
parent f063ea64a5
commit f1d42fe787
8 changed files with 28 additions and 28 deletions

View file

@ -19,7 +19,7 @@ import shutil
import subprocess
import sys
import tempfile
import urllib
import six.moves.urllib as urllib
from mach.decorators import (
CommandArgument,
@ -594,7 +594,7 @@ class PackageCommands(CommandBase):
"/secrets/v1/secret/project/servo/" +
name
)
return json.load(urllib.urlopen(url))["secret"]
return json.load(urllib.request.urlopen(url))["secret"]
def get_s3_secret():
aws_access_key = None