From 3e5a39f1c1c86e4a4f3d30f901eced06b57e7dc7 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Fri, 26 Jul 2024 09:39:43 +0200 Subject: [PATCH] fixup! remote/client: be more explicit about expected place acquired state in allow()/release_from() --- labgrid/remote/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/labgrid/remote/client.py b/labgrid/remote/client.py index f4ec632d7..49887da04 100755 --- a/labgrid/remote/client.py +++ b/labgrid/remote/client.py @@ -721,7 +721,9 @@ async def release(self): async def release_from(self): """Release a place, but only if acquired by a specific user""" - place = self.get_acquired_place() + place = self.get_place() + if not place.acquired: + raise UserError(f"place {place.name} is not acquired") request = labgrid_coordinator_pb2.ReleasePlaceRequest(placename=place.name, fromuser=self.args.acquired)