]> 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>
Tue, 7 Apr 2020 13:51:23 +0000 (21:51 +0800)
commit9ccf88d95fa5d184c56ac638bed37c3e3101356d
tree4b7e73043b89556a83bc9a6501f70daedec70aa4
parentdcecf1dbe4e456c060259b8591a887abc1f228bd
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>
qa/tasks/radosgw_admin.py