Skip to content
Snippets Groups Projects
Commit d385aafb authored by Hannes Feldt's avatar Hannes Feldt
Browse files

improve error reporting

parent 1f230545
No related branches found
Tags v0.0.8
1 merge request!4L2SS-2098: Fix various issues happening during renewal
Pipeline #104013 passed with warnings
Pipeline: Cryptocoryne

#104014

    ...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
    # SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
    """ Cryptocoryne certbot cli entrypoint """ """ Cryptocoryne certbot cli entrypoint """
    import acme.errors
    import hvac import hvac
    import lofar_cryptocoryne.dns_client as desec import lofar_cryptocoryne.dns_client as desec
    ...@@ -38,14 +38,14 @@ def main(): ...@@ -38,14 +38,14 @@ def main():
    if client.check_dns_propagation(timeout=1200): if client.check_dns_propagation(timeout=1200):
    print("Succeed. Request certificate") print("Succeed. Request certificate")
    client.request_certificate() client.request_certificate()
    print("Request done")
    certificate.fullchain = client.certificate certificate.fullchain = client.certificate
    print(f"Certificate {certificate}")
    vault_store.put_certificate(certificate) vault_store.put_certificate(certificate)
    print("Done") print("Done")
    else: else:
    print("Failed to issue certificate for " + str(client.domains)) print("Failed to issue certificate for " + str(client.domains))
    except acme.errors.ValidationError as ve:
    print(f"ValidatinError: {ve.failed_authzrs}")
    except Exception as e: # pylint: disable=broad-exception-caught except Exception as e: # pylint: disable=broad-exception-caught
    print(f"{type(e)}: {e}") print(f"{type(e)}: {e}")
    finally: finally:
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment