Properly handle non-existent cert files

https://fedorahosted.org/freeipa/ticket/3785
This commit is contained in:
Ana Krivokapic
2013-07-17 16:30:15 +02:00
committed by Martin Kosek
parent 240b12169b
commit f637d05a18
2 changed files with 12 additions and 3 deletions

View File

@@ -721,7 +721,7 @@ def check_pkcs12(pkcs12_info, ca_file, hostname):
ca_cert_name = 'The Root CA'
try:
nssdb.import_pem_cert(ca_cert_name, "CT,C,C", ca_file)
except ValueError, e:
except (ValueError, RuntimeError) as e:
raise ScriptError(str(e))
# Import everything in the PKCS#12