Skip to content

Commit

Permalink
Fix bug that resulted in wrong output displayed from list-backups act…
Browse files Browse the repository at this point in the history
…ion (#340)
  • Loading branch information
shayancanonical authored Nov 28, 2023
1 parent 23106ac commit 127f00b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/charms/mysql/v0/s3_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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


def upload_content_to_s3(content: str, content_path: str, s3_parameters: Dict) -> bool:
Expand Down Expand Up @@ -131,7 +131,7 @@ def list_backups_in_s3_path(s3_parameters: Dict) -> List[Tuple[str, str]]:
for content in page.get("Contents", []):
key = content["Key"]

filename = key.lstrip(s3_path_directory).split("/")[0]
filename = key.removeprefix(s3_path_directory)

if ".metadata" in filename:
try:
Expand Down

0 comments on commit 127f00b

Please sign in to comment.