[libvirt PATCH 04/11] scripts: group-qemu-caps: remove unnecessary regexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



regroup_caps uses these to filter out lines that should not
increase the counter. Here, we only care about the capability
constants, so we can let the final matching regex take care
of the matching.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 scripts/group-qemu-caps.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/scripts/group-qemu-caps.py b/scripts/group-qemu-caps.py
index e56c306d10..ee33f1cf16 100755
--- a/scripts/group-qemu-caps.py
+++ b/scripts/group-qemu-caps.py
@@ -44,11 +44,7 @@ def load_caps_flags(filename, start_regex, end_regex):
             break
 
     for line in lines[start:end]:
-        if re.search(r'''.*/\* [0-9]+ \*/.*''', line):
-            continue
-        if re.search(r'''^\s*$''', line):
-            continue
-        match = re.search(r'''[ ]+([A-Z0-9_]+)''', line)
+        match = re.search(r'''[ ]+([A-Z0-9_]+),''', line)
 
         if match:
             capsflags.append(match[1])
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux