[PATCH] test-wrap-argv.py: Actually print filename of offending script
Daniel Henrique Barboza
danielhb413 at gmail.com
Wed Jan 13 09:42:40 UTC 2021
On 1/12/21 3:51 PM, Peter Krempa wrote:
> The error message doesn't actually print the filename of the offending
> file:
>
> Incorrect line wrapping in %file
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> scripts/test-wrap-argv.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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)
Apparently my python is rusty. I would never tell that this would print
"Incorrect line wrapping in %file"
> + print("Incorrect line wrapping in '%s'" %
> + filename, file=sys.stderr)
Reviewed-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
> print("Use test-wrap-argv.py to wrap test data files",
> file=sys.stderr)
> return False
>
More information about the libvir-list
mailing list