[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <026a4e82-da46-a559-06d5-18cff798ad96@kernel.org>
Date: Tue, 14 Sep 2021 09:01:17 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: andreas@...mhold.de, Nick Desaulniers <ndesaulniers@...gle.com>
Cc: llvm@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gen_compile_commands: add missing sys import
Hi Andreas,
On 9/14/2021 8:44 AM, andreas@...mhold.de wrote:
> From: Andreas Rammhold <andreas@...mhold.de>
>
> The sys.exit was being used at multiple locations within the script but
> never imported. This lead to the script exiting with a error instead of
> with the nicely formatted (useful) error output.
>
> Signed-off-by: Andreas Rammhold <andreas@...mhold.de>
> ---
> scripts/clang-tools/gen_compile_commands.py | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
> index 0033eedce003e..1d1bde1fd45eb 100755
> --- a/scripts/clang-tools/gen_compile_commands.py
> +++ b/scripts/clang-tools/gen_compile_commands.py
> @@ -13,6 +13,7 @@ import logging
> import os
> import re
> import subprocess
> +import sys
>
> _DEFAULT_OUTPUT = 'compile_commands.json'
> _DEFAULT_LOG_LEVEL = 'WARNING'
>
Thank you for the patch! Someone else submitted the exact same fix and
it is now pending in the kbuild tree:
https://git.kernel.org/masahiroy/linux-kbuild/c/776f04ca2c29f13d483a3effc0c27404fe901143
I am curious, how did you discover this? Did you hit one of those error
paths?
Cheers,
Nathan
Powered by blists - more mailing lists