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 <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Rob Crittenden authored and Florence Blanc-Renaud committed 2021-02-18 16:52:05 +01:00
1 parent 5e49910bcf
commit ea58c75730
1 file changed
+3
+3
View File
@@ -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":