From: Kefu Chai Date: Mon, 27 Apr 2020 09:31:12 +0000 (+0800) Subject: qa/tasks: s/string.uppercase/string.ascii_uppercase/ X-Git-Tag: v14.2.10~17^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d6934d61183f8145784c5243bd0d68d610f67edd;p=ceph.git qa/tasks: s/string.uppercase/string.ascii_uppercase/ `string.uppercase` is renamed to `string.ascii_uppercase` in Python2 and Python3. so let's update accordingly. this change is not cherry-picked from master, as the modified file does not exist in master anymore. Signed-off-by: Kefu Chai --- diff --git a/qa/tasks/s3readwrite.py b/qa/tasks/s3readwrite.py index 89e6ff835da..d9e7234c435 100644 --- a/qa/tasks/s3readwrite.py +++ b/qa/tasks/s3readwrite.py @@ -77,7 +77,7 @@ def _config_user(s3tests_conf, section, user): s3tests_conf[section].setdefault('user_id', user) s3tests_conf[section].setdefault('email', '{user}+test@test.test'.format(user=user)) s3tests_conf[section].setdefault('display_name', 'Mr. {user}'.format(user=user)) - s3tests_conf[section].setdefault('access_key', ''.join(random.choice(string.uppercase) for i in range(20))) + s3tests_conf[section].setdefault('access_key', ''.join(random.choice(string.ascii_uppercase) for i in range(20))) s3tests_conf[section].setdefault('secret_key', base64.b64encode(os.urandom(40)).decode('ascii')) @contextlib.contextmanager diff --git a/qa/tasks/s3roundtrip.py b/qa/tasks/s3roundtrip.py index 3a037214b63..cf6a9e868d4 100644 --- a/qa/tasks/s3roundtrip.py +++ b/qa/tasks/s3roundtrip.py @@ -77,7 +77,7 @@ def _config_user(s3tests_conf, section, user): s3tests_conf[section].setdefault('user_id', user) s3tests_conf[section].setdefault('email', '{user}+test@test.test'.format(user=user)) s3tests_conf[section].setdefault('display_name', 'Mr. {user}'.format(user=user)) - s3tests_conf[section].setdefault('access_key', ''.join(random.choice(string.uppercase) for i in range(20))) + s3tests_conf[section].setdefault('access_key', ''.join(random.choice(string.ascii_uppercase) for i in range(20))) s3tests_conf[section].setdefault('secret_key', base64.b64encode(os.urandom(40)).decode('ascii')) @contextlib.contextmanager