From 577697301f8682293a00a793807687df9d0ce679 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Tue, 15 Oct 2019 09:03:06 +0200 Subject: Fix fetch_ceph_keys to run in python3 Quick fix to convert bytes object to string, that can be serialized by JSON. Change-Id: I7d3db8e43eccc06aaf21e84990317133fa515a1f --- docker/ceph/ceph-mon/fetch_ceph_keys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/ceph/ceph-mon/fetch_ceph_keys.py b/docker/ceph/ceph-mon/fetch_ceph_keys.py index f0f4a7154..31af87eed 100644 --- a/docker/ceph/ceph-mon/fetch_ceph_keys.py +++ b/docker/ceph/ceph-mon/fetch_ceph_keys.py @@ -50,7 +50,7 @@ def read_file(filename): raw_data = f.read() # TODO(mnasiadka): Remove sha1 in U - return {'content': base64.b64encode(zlib.compress(raw_data)), + return {'content': (base64.b64encode(zlib.compress(raw_data))).decode(), 'sha1': hashlib.sha1(raw_data).hexdigest(), 'sha256': hashlib.sha256(raw_data).hexdigest(), 'filename': filename} -- cgit v1.2.3