diff options
author | 2021-05-26 13:08:55 +0200 | |
---|---|---|
committer | 2021-06-01 20:40:32 +0200 | |
commit | a656fd764b0a608caaf198bfa9685a09a7eaca16 (patch) | |
tree | 501fa47e06658b8a43e2ccca4837c530a49dfc72 /xtesting/core/campaign.py | |
parent | 6192b2cf9ffd46bdb8189ce3236cf4d9b722b69c (diff) |
Drop six
python 2 was dropped [1] so we don't need six anymore
[1]: https://gerrit.opnfv.org/gerrit/c/functest-xtesting/+/68262
Signed-off-by: Vincent Danno <vincent.danno@orange.com>
Change-Id: I840211990b76f77a46e9e737fc4a4c857b57c0b2
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), |