From: Peter Krempa Date: Tue, 12 Jan 2021 18:32:00 +0000 (+0100) Subject: scripts: Actually print filename of offending file X-Git-Tag: v7.1.0-rc1~561 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b724b7d197a8c0f6434dd5075eab39cfca7fed24;p=thirdparty%2Flibvirt.git scripts: Actually print filename of offending file 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 Reviewed-by: Daniel Henrique Barboza --- diff --git a/scripts/group-qemu-caps.py b/scripts/group-qemu-caps.py index c53ff3ff6f..6fad9afc5b 100755 --- a/scripts/group-qemu-caps.py +++ b/scripts/group-qemu-caps.py @@ -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 diff --git a/scripts/test-wrap-argv.py b/scripts/test-wrap-argv.py index 6b0d3511f3..9ec572b479 100755 --- a/scripts/test-wrap-argv.py +++ b/scripts/test-wrap-argv.py @@ -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