From 24d86c9ca56f952e1247b21bfe517fc331cc1cd4 Mon Sep 17 00:00:00 2001 From: skycastlelily Date: Thu, 23 May 2024 19:02:36 +0800 Subject: [PATCH] Pass correct spec to _parse_system and _parse_location (#2924) --- tmt/hardware.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmt/hardware.py b/tmt/hardware.py index ea38b49c7a..624413e46e 100644 --- a/tmt/hardware.py +++ b/tmt/hardware.py @@ -1266,7 +1266,7 @@ def _parse_location(spec: Spec) -> BaseConstraint: if 'lab-controller' in spec: group.constraints += [ TextConstraint.from_specification( - 'location.lab-controller', + 'location.lab_controller', spec['lab-controller'], allowed_operators=[Operator.EQ, Operator.NEQ, Operator.MATCH, Operator.NOTMATCH]) ] @@ -1314,10 +1314,10 @@ def _parse_generic_spec(spec: Spec) -> BaseConstraint: group.constraints += [_parse_hostname(spec)] if 'location' in spec: - group.constraints += [_parse_location(spec)] + group.constraints += [_parse_location(spec['location'])] if 'system' in spec: - group.constraints += [_parse_system(spec)] + group.constraints += [_parse_system(spec['system'])] if 'tpm' in spec: group.constraints += [_parse_tpm(spec['tpm'])]