Skip to content

Commit

Permalink
fixup! update counter to start with 0 for s3 and swift backends
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioSim committed Nov 22, 2023
1 parent 910c55a commit cb53982
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ralph/backends/data/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,5 @@ def close(self) -> None:
def _count(statements: Iterable, counter: dict) -> Iterator:
"""Count the elements in the `statements` Iterable and yield element."""
for statement in statements:
counter["count"] += 1
yield statement
counter["count"] += 1
2 changes: 1 addition & 1 deletion src/ralph/backends/data/swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,5 @@ def _details(self, container: str, name: str):
def _count(statements: Iterable, counter: dict) -> Iterator:
"""Count the elements in the `statements` Iterable and yield element."""
for statement in statements:
counter["count"] += 1
yield statement
counter["count"] += 1

0 comments on commit cb53982

Please sign in to comment.