URL: https://github.com/freeipa/freeipa/pull/934
Author: stlaz
 Title: #934: krainstance: fix writing str to file
Action: opened

PR body:
"""
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/934/head:pr934
git checkout pr934
From adaa57851233860d3278abc636de0fe66e315c06 Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Thu, 27 Jul 2017 11:54:44 +0200
Subject: [PATCH] krainstance: fix writing str to file

https://pagure.io/freeipa/issue/4985
---
 ipaserver/install/krainstance.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/install/krainstance.py b/ipaserver/install/krainstance.py
index 7f82b755df..79ad853b9f 100644
--- a/ipaserver/install/krainstance.py
+++ b/ipaserver/install/krainstance.py
@@ -274,7 +274,7 @@ def __spawn_instance(self):
             parentdir = os.path.dirname(paths.ADMIN_CERT_PATH)
             if not os.path.exists(parentdir):
                 os.makedirs(parentdir)
-            with open(paths.ADMIN_CERT_PATH, "w") as admin_path:
+            with open(paths.ADMIN_CERT_PATH, "wb") as admin_path:
                 admin_path.write(
                     base64.b64encode(cert.public_bytes(x509.Encoding.DER))
                 )
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to