From 3a8698d0a278704a873ff079718502a8a304603b Mon Sep 17 00:00:00 2001 From: Telcobot Date: Fri, 20 Dec 2024 00:17:13 +0000 Subject: [PATCH] chore: update charm libraries --- .../tls_certificates_interface/v4/tls_certificates.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/charms/tls_certificates_interface/v4/tls_certificates.py b/lib/charms/tls_certificates_interface/v4/tls_certificates.py index cb24d77..278207d 100644 --- a/lib/charms/tls_certificates_interface/v4/tls_certificates.py +++ b/lib/charms/tls_certificates_interface/v4/tls_certificates.py @@ -52,7 +52,7 @@ # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 4 +LIBPATCH = 5 PYDEPS = ["cryptography", "pydantic"] @@ -1030,7 +1030,14 @@ def _mode_is_valid(self, mode: Mode) -> bool: def _on_secret_remove(self, event: SecretRemoveEvent) -> None: """Handle Secret Removed Event.""" - event.secret.remove_revision(event.revision) + try: + event.secret.remove_revision(event.revision) + except SecretNotFoundError: + logger.warning( + "No such secret %s, nothing to remove", + event.secret.label or event.secret.id, + ) + return def _on_secret_expired(self, event: SecretExpiredEvent) -> None: """Handle Secret Expired Event.