From 4079553a32830d6d9a19955ad13ee47722a90861 Mon Sep 17 00:00:00 2001 From: Michel Thebeau Date: Wed, 16 Aug 2023 09:40:59 -0400 Subject: [PATCH] libvirt: improve error msg for host key value The error message is unclear, omitting the key for the data in host definition. Test Plan: PASS regresion PASS unit test of code path Story: 2010816 Task: 48636 Change-Id: I90ca410c252f9ce14b8dd4c13affb592eac88d85 Signed-off-by: Michel Thebeau --- libvirt/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt/config.py b/libvirt/config.py index 7e90d0c..4d41a7d 100755 --- a/libvirt/config.py +++ b/libvirt/config.py @@ -135,8 +135,8 @@ def host_key_validate(data, field, value): errnum += 1 elif key in ('cpu', 'mem'): if not isinstance(item, int): - print('%s is not valid for %s' % - (item, field), file=sys.stderr) + print('%s is not valid for %s in %s' % + (item, key, field), file=sys.stderr) errnum += 1 return errnum