]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa/tasks: pass encoding to Key.get_content_as_string()
authorKefu Chai <kchai@redhat.com>
Mon, 6 Apr 2020 15:08:59 +0000 (23:08 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 14 Jun 2020 08:34:52 +0000 (16:34 +0800)
commit4cebdb5674862dc63c5a893822195570c5499f04
tree0313d594611bdb065a169f15ae7438a9f23099c2
parente0f75af23a48c4072bd99e21bcdeab8a6e90199b
qa/tasks: pass encoding to Key.get_content_as_string()

we assume that boto.Key.get_content_as_string() returns str instead of
bytes, and compare the return value with a string, so, to ensure that
lhs and rhs are both strings, we need to decode the returned content.

since we always store strings composed with ASCII, it's safe to use
'ascii' to decode them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9ccf88d95fa5d184c56ac638bed37c3e3101356d)
qa/tasks/radosgw_admin.py