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
This commit is contained in:
Michael Kelly 2022-08-17 18:20:07 -07:00
parent a87052d3c7
commit a5da3f075e
No known key found for this signature in database
GPG Key ID: 77F7FE93040ECF3E

View File

@ -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,