]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
scripts: Actually print filename of offending file
authorPeter Krempa <pkrempa@redhat.com>
Tue, 12 Jan 2021 18:32:00 +0000 (19:32 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 15 Jan 2021 14:26:16 +0000 (15:26 +0100)
The error message printed by scripts/group-qemu-caps.py and
scripts/test-wrap-argv.py doesn't actually print the filename of the
offending file:

 Incorrect line wrapping in $file

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
scripts/group-qemu-caps.py
scripts/test-wrap-argv.py

index c53ff3ff6f1829f732374c8f2c4e57656b89df46..6fad9afc5bedbe014b8dfc31fa604f6e17622908 100755 (executable)
@@ -78,8 +78,8 @@ def regroup_caps(check, filename, start_regex, end_regex,
                                     stdin=subprocess.PIPE)
             diff.communicate(input=new.encode('utf-8'))
 
-            print("Incorrect line wrapping in $file",
-                  file=sys.stderr)
+            print("Incorrect line wrapping in '%s'" %
+                  filename, file=sys.stderr)
             print("Use group-qemu-caps.py to generate data files",
                   file=sys.stderr)
             return False
index 6b0d3511f3bd108a7a3759c85e515baf28adddb7..9ec572b479a293b2821df76d182acbcfd7731b6b 100755 (executable)
@@ -137,8 +137,8 @@ def rewrap(filename, in_place, check):
                                     stdin=subprocess.PIPE)
             diff.communicate(input=new.encode('utf-8'))
 
-            print("Incorrect line wrapping in $file",
-                  file=sys.stderr)
+            print("Incorrect line wrapping in '%s'" %
+                  filename, file=sys.stderr)
             print("Use test-wrap-argv.py to wrap test data files",
                   file=sys.stderr)
             return False