diff options
author | 2021-06-03 06:16:49 +0000 | |
---|---|---|
committer | 2021-06-03 06:16:49 +0000 | |
commit | ec6921039af3b016eecc6e609f2554aea0f81e2c (patch) | |
tree | 4d2df62475e73a563e572180a13dec3b5e1b994e /xtesting/core/campaign.py | |
parent | 454bef238020d8ac0e986807f34dfc140362b629 (diff) | |
parent | a656fd764b0a608caaf198bfa9685a09a7eaca16 (diff) |
Merge "Drop six"
Diffstat (limited to 'xtesting/core/campaign.py')
-rw-r--r-- | xtesting/core/campaign.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xtesting/core/campaign.py b/xtesting/core/campaign.py index 51a145c1..58747681 100644 --- a/xtesting/core/campaign.py +++ b/xtesting/core/campaign.py @@ -17,12 +17,12 @@ import os import re import zipfile +from urllib.parse import urlparse import boto3 from boto3.s3.transfer import TransferConfig import botocore import pkg_resources import requests -from six.moves import urllib from xtesting.core import testcase from xtesting.utils import env @@ -120,9 +120,9 @@ class Campaign(): multipart_threshold = 5 * 1024 ** 5 if "google" in os.environ[ "S3_ENDPOINT_URL"] else 8 * 1024 * 1024 config = TransferConfig(multipart_threshold=multipart_threshold) - bucket_name = urllib.parse.urlparse(dst_s3_url).netloc + bucket_name = urlparse(dst_s3_url).netloc s3path = re.search( - '^/*(.*)/*$', urllib.parse.urlparse(dst_s3_url).path).group(1) + '^/*(.*)/*$', urlparse(dst_s3_url).path).group(1) prefix = os.path.join(s3path, build_tag) # pylint: disable=no-member for s3_object in b3resource.Bucket(bucket_name).objects.filter( @@ -183,9 +183,9 @@ class Campaign(): multipart_threshold = 5 * 1024 ** 5 if "google" in os.environ[ "S3_ENDPOINT_URL"] else 8 * 1024 * 1024 config = TransferConfig(multipart_threshold=multipart_threshold) - bucket_name = urllib.parse.urlparse(dst_s3_url).netloc + bucket_name = urlparse(dst_s3_url).netloc mime_type = mimetypes.guess_type('{}.zip'.format(build_tag)) - path = urllib.parse.urlparse(dst_s3_url).path.strip("/") + path = urlparse(dst_s3_url).path.strip("/") # pylint: disable=no-member b3resource.Bucket(bucket_name).upload_file( '{}.zip'.format(build_tag), |