From bb538e000c7569f6290ae3ae57fd84f8d17e1208 Mon Sep 17 00:00:00 2001 From: Eran Date: Thu, 22 Aug 2024 09:02:41 +0300 Subject: [PATCH] fix bug in dds tests librs.py with wait_for_devices() --- unit-tests/dds/librs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unit-tests/dds/librs.py b/unit-tests/dds/librs.py index 9a99e828f5..3c80cefc59 100644 --- a/unit-tests/dds/librs.py +++ b/unit-tests/dds/librs.py @@ -39,7 +39,11 @@ def wait_for_devices( context, mask=product_line.any, n=1, timeout=3, throw=None timer = _Timer( timeout ) devices = context.query_devices( mask ) if len(devices) >= n: - if not exact or len(devices) == n: + if not exact: + return devices + if len(devices) == n: + if n == 1: + return devices[0] return devices # context.set_devices_changed_callback( _device_change_callback )