From 288f39483e83575d0bf3ec7a8e0d872b41b5b183 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Fri, 19 Apr 2024 15:59:31 +0200 Subject: [PATCH] feat: added support for nestes device configs --- ophyd_devices/utils/static_device_test.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ophyd_devices/utils/static_device_test.py b/ophyd_devices/utils/static_device_test.py index 89e69c0..a7b07f5 100644 --- a/ophyd_devices/utils/static_device_test.py +++ b/ophyd_devices/utils/static_device_test.py @@ -299,12 +299,11 @@ def launch() -> None: raise FileNotFoundError(f"Config file {clargs.config} not found.") if os.path.isdir(clargs.config): - files = os.listdir(clargs.config) - files = [ - os.path.join(clargs.config, file) - for file in files - if file.endswith(".yaml") or file.endswith(".yml") - ] + files = [] + for root, _, filenames in os.walk(clargs.config): + for filename in filenames: + if filename.endswith(".yaml") or filename.endswith(".yml"): + files.append(os.path.join(root, filename)) else: files = [clargs.config]