Skip to content

Commit

Permalink
Fixed the logic of the warning in list
Browse files Browse the repository at this point in the history
The warning about not all items have been shown in the list call was
exactly the wrong way around.
It we actually hit StopIteration, we _have_ seen them all.

fixes #1068
  • Loading branch information
mdellweg committed Sep 13, 2024
1 parent 5132874 commit 2a033ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/pulp-glue/1068.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed the "list" commands to show the notification about not displaying all items when it shouldn't and the other way around.
2 changes: 2 additions & 0 deletions pulp-glue/pulp_glue/common/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,8 @@ def list(self, limit: int, offset: int, parameters: t.Dict[str, t.Any]) -> t.Lis
self.list_iterator(parameters=parameters, offset=offset, stats=stats)
)
except StopIteration:
pass
else:
self.pulp_ctx.echo(
_("Not all {count} entries were shown.").format(count=stats["count"]), err=True
)
Expand Down

0 comments on commit 2a033ee

Please sign in to comment.