From ff5ce2cf1457e1945aea0fe4a023bc48bffe1174 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 4 May 2020 16:39:59 -0400 Subject: [PATCH] test/rgw: Cluster.admin() returns output as utf-8 str fixes the TypeError: File "rgw_multi/tests.py", line 1107, in test_bucket_sync_disable check_buckets_sync_status_obj_not_exist(zone, buckets) File "rgw_multi/tests.py", line 438, in check_buckets_sync_status_obj_not_exist if log_list.find(':'+bucket+":") >= 0: TypeError: argument should be integer or bytes-like object, not 'str' Signed-off-by: Casey Bodley --- src/test/rgw/test_multi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/rgw/test_multi.py b/src/test/rgw/test_multi.py index 106f6d0f321..6f8cec18a65 100644 --- a/src/test/rgw/test_multi.py +++ b/src/test/rgw/test_multi.py @@ -43,8 +43,8 @@ def bash(cmd, **kwargs): check_retcode = kwargs.pop('check_retcode', True) kwargs['stdout'] = subprocess.PIPE process = subprocess.Popen(cmd, **kwargs) - s = process.communicate()[0] - log.debug('command returned status=%d stdout=%s', process.returncode, s.decode('utf-8')) + s = process.communicate()[0].decode('utf-8') + log.debug('command returned status=%d stdout=%s', process.returncode, s) if check_retcode: assert(process.returncode == 0) return (s, process.returncode) -- 2.39.5