From 276bef101b9fa0f83e5de353bc733270d958ee41 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Thu, 27 Jul 2017 11:54:44 +0200 Subject: [PATCH] krainstance: fix writing str to file https://pagure.io/freeipa/issue/4985 Reviewed-By: Stanislav Laznicka --- 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 7f82b755d..79ad853b9 100644 --- a/ipaserver/install/krainstance.py +++ b/ipaserver/install/krainstance.py @@ -274,7 +274,7 @@ class KRAInstance(DogtagInstance): 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)) )