Skip to content

Commit 4230591

Browse files
remote/client: drop redundant checks
These checks are already performed by get_idle_place(). Signed-off-by: Bastian Krause <[email protected]>
1 parent 5679fa5 commit 4230591

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

labgrid/remote/client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,6 @@ async def add_match(self):
597597
"""Add a match for a place, making fuzzy matching available to the
598598
client"""
599599
place = self.get_idle_place()
600-
if place.acquired:
601-
raise UserError(f"can not change acquired place {place.name}")
602600
for pattern in self.args.patterns:
603601
if not 2 <= pattern.count("/") <= 3:
604602
raise UserError(f"invalid pattern format '{pattern}' (use 'exporter/group/cls/name')")
@@ -617,8 +615,6 @@ async def add_match(self):
617615
async def del_match(self):
618616
"""Delete a match for a place"""
619617
place = self.get_idle_place()
620-
if place.acquired:
621-
raise UserError(f"can not change acquired place {place.name}")
622618
for pattern in self.args.patterns:
623619
if not 2 <= pattern.count("/") <= 3:
624620
raise UserError(f"invalid pattern format '{pattern}' (use 'exporter/group/cls/name')")
@@ -638,8 +634,6 @@ async def add_named_match(self):
638634
639635
Fuzzy matching is not allowed to avoid accidental names conflicts."""
640636
place = self.get_idle_place()
641-
if place.acquired:
642-
raise UserError(f"can not change acquired place {place.name}")
643637
pattern = self.args.pattern
644638
name = self.args.name
645639
if not 2 <= pattern.count("/") <= 3:

0 commit comments

Comments
 (0)