The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: andreas@rammhold.de, Nick Desaulniers <ndesaulniers@google.com>
Cc: llvm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gen_compile_commands: add missing sys import
Date: Tue, 14 Sep 2021 09:01:17 -0700	[thread overview]
Message-ID: <026a4e82-da46-a559-06d5-18cff798ad96@kernel.org> (raw)
In-Reply-To: <20210914154441.1726853-1-andreas@rammhold.de>

Hi Andreas,

On 9/14/2021 8:44 AM, andreas@rammhold.de wrote:
> From: Andreas Rammhold <andreas@rammhold.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@rammhold.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


  parent reply	other threads:[~2021-09-14 16:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 15:44 [PATCH] gen_compile_commands: add missing sys import andreas
2021-09-14 16:01 ` Nick Desaulniers
2021-09-14 16:01 ` Nathan Chancellor [this message]
2021-09-14 16:31   ` Andreas Rammhold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=026a4e82-da46-a559-06d5-18cff798ad96@kernel.org \
    --to=nathan@kernel.org \
    --cc=andreas@rammhold.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox