[libvirt PATCH 02/11] scripts: group-qemu-caps: store paths in helper variables

Ján Tomko jtomko at redhat.com
Tue Aug 24 14:25:05 UTC 2021


Avoid repetition and specifying the path to the header file twice.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 scripts/group-qemu-caps.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/group-qemu-caps.py b/scripts/group-qemu-caps.py
index ec10f24384..bd22dd992a 100755
--- a/scripts/group-qemu-caps.py
+++ b/scripts/group-qemu-caps.py
@@ -133,12 +133,15 @@ args = parser.parse_args()
 
 errs = False
 
-capsflags = load_caps_flags(args.prefix + 'src/qemu/qemu_capabilities.h',
+header_path = args.prefix + 'src/qemu/qemu_capabilities.h'
+source_path = args.prefix + 'src/qemu/qemu_capabilities.c'
+
+capsflags = load_caps_flags(header_path,
                             r'virQEMUCapsFlags grouping marker',
                             r'QEMU_CAPS_LAST \/\* this must')
 
 if not regroup_caps(args.check,
-                    args.prefix + 'src/qemu/qemu_capabilities.c',
+                    source_path,
                     r'virQEMUCaps grouping marker',
                     r'\);',
                     0,
@@ -147,7 +150,7 @@ if not regroup_caps(args.check,
     errs = True
 
 if not regroup_caps(args.check,
-                    args.prefix + 'src/qemu/qemu_capabilities.h',
+                    header_path,
                     r'virQEMUCapsFlags grouping marker',
                     r'QEMU_CAPS_LAST \/\* this must',
                     1,
-- 
2.31.1




More information about the libvir-list mailing list