Debug-log tracebacks in _import_kra_transport_cert_to_nss_db

I understand the desire to not log tracebacks for more-or-less expected
errors, but the broad exception handling makes problems like

    Error in importing transport cert. KRA may not be enabled:
    a bytes-like object is required, not 'str'

(as seen in the gate) a bit mysterious.

Change-Id: Idc6b57e4b77f01df98035c4508594d5921ef2cb6
This commit is contained in:
Tim Burke 2019-10-11 14:07:35 -07:00
parent 37aeefe01a
commit 1bb46d2bdc

View File

@ -115,6 +115,7 @@ def _import_kra_transport_cert_to_nss_db(conf, crypto):
transport_cert = systemcert_client.get_transport_cert()
crypto.import_cert(KRA_TRANSPORT_NICK, transport_cert, ",,")
except Exception as e:
LOG.debug("Error importing KRA transport cert.", exc_info=True)
LOG.error("Error in importing transport cert."
" KRA may not be enabled: %s", e)