Skip to content

Commit

Permalink
chore: Update charm libraries (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
telcobot authored Dec 20, 2024
1 parent 00fd89a commit 0f3398e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/charms/tls_certificates_interface/v4/tls_certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 0f3398e

Please sign in to comment.