From c4c8f40ac73fec1aa0ddc33ce595fb5408af01e1 Mon Sep 17 00:00:00 2001 From: Joo Liang Cheah Date: Fri, 31 May 2024 10:19:24 +0800 Subject: [PATCH] raise RuntimeError instead of returning empty string --- examples/synchronization/multi_function/ai_ao_sync.py | 2 +- examples/synchronization/multi_function/cont_ai_di_acq.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/synchronization/multi_function/ai_ao_sync.py b/examples/synchronization/multi_function/ai_ao_sync.py index 3b6592e8..7c935b09 100644 --- a/examples/synchronization/multi_function/ai_ao_sync.py +++ b/examples/synchronization/multi_function/ai_ao_sync.py @@ -30,7 +30,7 @@ def get_terminal_name_with_dev_prefix(task: nidaqmx.Task, terminal_name: str) -> ]: return f"/{device.name}/{terminal_name}" - return "" + raise RuntimeError("Suitable device not found in task.") def generate_sine_wave( diff --git a/examples/synchronization/multi_function/cont_ai_di_acq.py b/examples/synchronization/multi_function/cont_ai_di_acq.py index d2ecfaf5..e3ed773d 100644 --- a/examples/synchronization/multi_function/cont_ai_di_acq.py +++ b/examples/synchronization/multi_function/cont_ai_di_acq.py @@ -26,7 +26,7 @@ def get_terminal_name_with_dev_prefix(task: nidaqmx.Task, terminal_name: str) -> ]: return f"/{device.name}/{terminal_name}" - return "" + raise RuntimeError("Suitable device not found in task.") def main():