From a5da3f075eb0452a722403c50e5a33a4af55d62b Mon Sep 17 00:00:00 2001 From: Michael Kelly Date: Wed, 17 Aug 2022 18:20:07 -0700 Subject: [PATCH] Convert base64 encoded value to string If we leave the value has as the result of b64decode(), we end up with a bytes-like object that gets serialized into our zuul.conf as b'.....', which is likely not what we actually want. Instead, assume this is a utf-8 encoded value and decode it that way. Change-Id: Ie61ad82c022888000e72bedfea99123dda34d5c0 --- zuul_operator/zuul.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul_operator/zuul.py b/zuul_operator/zuul.py index 9fc712c..25beef5 100644 --- a/zuul_operator/zuul.py +++ b/zuul_operator/zuul.py @@ -213,7 +213,7 @@ class Zuul: if k == 'sshkey': v = f'/etc/zuul/connections/{connection_name}/sshkey' else: - v = base64.b64decode(v) + v = base64.b64decode(v).decode('utf-8') connection[k] = v kw = {'connections': connections,