From ea58c75730e5b6e0f1d8597c8dafdc4a0c86ed70 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 11 Feb 2021 16:46:25 -0500 Subject: [PATCH] Suppress error message if the CRL directory doesn't exist If the CA fails to deploy then the CRL directory will not exist but will report an error that it has failed to be removed. There is no need to try to navigate a directory if it doesn't exist. Related: https://pagure.io/freeipa/issue/8565 Signed-off-by: Rob Crittenden Reviewed-By: Alexander Bokovoy Reviewed-By: Florence Blanc-Renaud --- ipaserver/install/cainstance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 0ee647fd5..cd21c80eb 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -231,6 +231,9 @@ def get_crl_files(path=None): if path is None: path = paths.PKI_CA_PUBLISH_DIR + if not os.path.exists(path): + return + files = os.listdir(path) for f in files: if f == "MasterCRL.bin":