Merge lp:~barryprice/charms/trusty/thruk-master/trunk into lp:~canonical-bootstack/charms/trusty/thruk-master/trunk

Proposed by Barry Price
Status: Merged
Merged at revision: 24
Proposed branch: lp:~barryprice/charms/trusty/thruk-master/trunk
Merge into: lp:~canonical-bootstack/charms/trusty/thruk-master/trunk
Diff against target: 11 lines (+1/-1)
1 file modified
hooks/actions.py (+1/-1)
To merge this branch: bzr merge lp:~barryprice/charms/trusty/thruk-master/trunk
Reviewer Review Type Date Requested Status
Xav Paice (community) Approve
Review via email: mp+345565@code.launchpad.net

Commit message

Don't str(str) the base64-decoded trusted cert

To post a comment you must log in.
25. By Barry Price

Handle python3's b64decode returning bytes

Revision history for this message
Xav Paice (xavpaice) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/actions.py'
2--- hooks/actions.py 2017-07-25 09:13:13 +0000
3+++ hooks/actions.py 2018-05-15 04:35:51 +0000
4@@ -58,6 +58,6 @@
5 hookenv.log("Writing cert from trusted_ssl_cert: %s"
6 % trusted_ssl_cert)
7 with open(cert_file, 'w') as f:
8- f.write(str(base64.b64decode(trusted_ssl_cert)))
9+ f.write(base64.b64decode(trusted_ssl_cert).decode('utf-8'))
10
11 subprocess.call(["/usr/sbin/update-ca-certificates"])

Subscribers

People subscribed via source and target branches