Skip to content

Commit

Permalink
amend! Add list of available places
Browse files Browse the repository at this point in the history
Add list of released places

Signed-off-by: Ivan Stepic <[email protected]>
  • Loading branch information
Ivan Stepic authored and istepic committed Feb 11, 2025
1 parent ed0bf22 commit 69a8f24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contrib/completion/labgrid-client.bash
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ _labgrid_client_r()
_labgrid_client_places()
{
_labgrid_client_generic_subcommand "--acquired --available --sort-last-changed"
_labgrid_client_generic_subcommand "--acquired --released --sort-last-changed"
}
_labgrid_client_p()
Expand Down
4 changes: 2 additions & 2 deletions labgrid/remote/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ async def print_places(self):
for name, place in places:
if self.args.acquired and place.acquired is None:
continue
elif self.args.available and place.acquired:
elif self.args.released and place.acquired:
continue
if self.args.verbose:
print(f"Place '{name}':")
Expand Down Expand Up @@ -1736,7 +1736,7 @@ def main():

subparser = subparsers.add_parser("places", aliases=("p",), help="list available places")
subparser.add_argument("-a", "--acquired", action="store_true")
subparser.add_argument("-l", "--available", action="store_true")
subparser.add_argument("-l", "--released", action="store_true")
subparser.add_argument("--sort-last-changed", action="store_true", help="sort by last changed date (oldest first)")
subparser.set_defaults(func=ClientSession.print_places)

Expand Down

0 comments on commit 69a8f24

Please sign in to comment.