Skip to content

Commit

Permalink
remote/client: be more explicit about expected place acquired state i…
Browse files Browse the repository at this point in the history
…n allow()/release_from()

Signed-off-by: Bastian Krause <[email protected]>
  • Loading branch information
Bastian-Krause committed Jul 24, 2024
1 parent 928948f commit dac0d84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labgrid/remote/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ async def release(self):

async def release_from(self):
"""Release a place, but only if acquired by a specific user"""
place = self.get_place()
place = self.get_acquired_place()

request = labgrid_coordinator_pb2.ReleasePlaceRequest(placename=place.name, fromuser=self.args.acquired)

Expand All @@ -733,7 +733,7 @@ async def release_from(self):

async def allow(self):
"""Allow another use access to a previously acquired place"""
place = self.get_place()
place = self.get_acquired_place()
if "/" not in self.args.user:
raise UserError(f"user {self.args.user} must be in <host>/<username> format")
request = labgrid_coordinator_pb2.AllowPlaceRequest(placename=place.name, user=self.args.user)
Expand Down

0 comments on commit dac0d84

Please sign in to comment.