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 2021-02-11 16:46:25 -05:00 committed by Florence Blanc-Renaud
parent 5e49910bcf
commit ea58c75730

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":