URL: https://github.com/freeipa/freeipa/pull/952 Author: stlaz Title: #952: tasks: remove str on bytes Action: opened
PR body: """ This enables ipa-certupdate to be run in Python 3 https://pagure.io/freeipa/issue/4985 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/952/head:pr952 git checkout pr952
From 34e57884fa8d8c2973b6574041941ba4a9b7418e Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka <slazn...@redhat.com> Date: Wed, 2 Aug 2017 10:34:56 +0200 Subject: [PATCH] tasks: remove str on bytes This enables ipa-certupdate to be run in Python 3 https://pagure.io/freeipa/issue/4985 --- ipaplatform/redhat/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipaplatform/redhat/tasks.py b/ipaplatform/redhat/tasks.py index cc52c6c5f0..a4329656cb 100644 --- a/ipaplatform/redhat/tasks.py +++ b/ipaplatform/redhat/tasks.py @@ -298,7 +298,8 @@ def insert_ca_certs_into_systemwide_ca_store(self, ca_certs): obj += "trusted: true\n" elif trusted is False: obj += "x-distrusted: true\n" - obj += "{pem}\n\n".format(pem=cert.public_bytes(x509.Encoding.PEM)) + obj += "{pem}\n\n".format( + pem=cert.public_bytes(x509.Encoding.PEM).encode('ascii')) f.write(obj) if ext_key_usage is not None and public_key_info not in has_eku:
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org