From: Alfredo Deza Date: Wed, 1 May 2019 13:35:52 +0000 (-0400) Subject: gatherkeys: no need to decode - already done by remoto X-Git-Tag: v2.1.0~19^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5aff94ae30b843f4676ed9da68c17f8d0d938122;p=ceph-deploy.git gatherkeys: no need to decode - already done by remoto Signed-off-by: Alfredo Deza Resolves: rm#39489 --- diff --git a/ceph_deploy/gatherkeys.py b/ceph_deploy/gatherkeys.py index ebd4158..2531a8b 100644 --- a/ceph_deploy/gatherkeys.py +++ b/ceph_deploy/gatherkeys.py @@ -143,7 +143,7 @@ def gatherkeys_missing(args, distro, rlogger, keypath, keytype, dest_dir): keyring_path_local = os.path.join(dest_dir, keyring_name_local) with open(keyring_path_local, 'wb') as f: for line in out: - f.write(line + b'\n') + f.write(line.decode('utf-8') + '\n') return True @@ -183,7 +183,7 @@ def gatherkeys_with_mon(args, host, dest_dir): rlogger.debug(line) return False try: - mon_status = json.loads(b''.join(out).decode('utf-8')) + mon_status = json.loads(''.join(out)) except ValueError: rlogger.error('"ceph mon_status %s" output was not json', host) for line in out: