From: Tormod Volden Date: Fri, 16 Aug 2024 12:21:43 +0000 (+0200) Subject: hctltest1.py: Skip read/write if no values in element X-Git-Tag: v1.2.14~4 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=201bcaa290cf29f03d07d80fdf0df391292d8da0;p=alsa-python.git hctltest1.py: Skip read/write if no values in element Closes: https://github.com/alsa-project/alsa-python/pull/14 Signed-off-by: Tormod Volden Signed-off-by: Jaroslav Kysela --- diff --git a/test/hctltest1.py b/test/hctltest1.py index 9962af6..88b9dfb 100755 --- a/test/hctltest1.py +++ b/test/hctltest1.py @@ -32,6 +32,8 @@ def value(element): if a.startswith('__'): continue print(' %s: %s' % (a, getattr(value, a))) + if info.count == 0: + return values = value.get_tuple(info.type, info.count) print(' Values:', values) value.set_tuple(info.type, values)