From a656fd764b0a608caaf198bfa9685a09a7eaca16 Mon Sep 17 00:00:00 2001 From: Vincent Danno Date: Wed, 26 May 2021 13:08:55 +0200 Subject: 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 Change-Id: I840211990b76f77a46e9e737fc4a4c857b57c0b2 --- xtesting/core/campaign.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xtesting/core/campaign.py') 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), -- cgit 1.2.3-korg