From 8adf5aebad3e9546acc69b08bd7340755d73572e Mon Sep 17 00:00:00 2001 From: Madhukar Reddy Kadireddy Date: Thu, 20 Jun 2024 19:01:10 +0530 Subject: [PATCH] Casefolding device name instead os strict case sensitive comparison --- realsense2_camera/test/utils/pytest_live_camera_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/realsense2_camera/test/utils/pytest_live_camera_utils.py b/realsense2_camera/test/utils/pytest_live_camera_utils.py index 90a6a2d55e..ac91620f12 100644 --- a/realsense2_camera/test/utils/pytest_live_camera_utils.py +++ b/realsense2_camera/test/utils/pytest_live_camera_utils.py @@ -198,11 +198,9 @@ def check_if_camera_connected(device_type, serial_no=None): name_line = long_data[index].split() if name_line[0] != "Intel": continue - if name_line[2] != device_type: + if name_line[2].casefold() != device_type.casefold(): continue - if serial_no == None: - return True - if serial_no == name_line[3]: + if serial_no is None or serial_no == name_line[3]: return True return False