]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: s/string.uppercase/string.ascii_uppercase/
authorKefu Chai <kchai@redhat.com>
Mon, 27 Apr 2020 09:31:12 +0000 (17:31 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 11:57:00 +0000 (19:57 +0800)
`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 <kchai@redhat.com>
qa/tasks/s3readwrite.py
qa/tasks/s3roundtrip.py

index 89e6ff835da518eeabed84d599a36c2c68ad1ccb..d9e7234c4351326bc9b8985c13a9cd9e3ff74fed 100644 (file)
@@ -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
index 3a037214b63e40fbe58b15c9ae96d1a7f46c2d16..cf6a9e868d4c688c4c869948d83cf041d2df129b 100644 (file)
@@ -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