[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <12647854.O9o76ZdvQC@radijator>
Date: Mon, 07 Apr 2025 16:38:19 +0200
From: Duje Mihanović <duje.mihanovic@...le.hr>
To: Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ricardo Ribalda <ribalda@...omium.org>
Cc: linux-spdx@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts/spdxcheck: Limit the scope of git.Repo
On Tuesday, 25 February 2025 14:10:41 Central European Summer Time Ricardo
Ribalda wrote:
> If the git.Repo object's scope extends to the Python interpreter's
> shutdown phase, its destructor may fail due to the interpreter's state.
>
> Exception ignored in: <function Git.AutoInterrupt.__del__ at 0x7f1941dd5620>
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/git/cmd.py", line 565, in __del__
> File "/usr/lib/python3/dist-packages/git/cmd.py", line 546, in _terminate
> File "/usr/lib/python3.13/subprocess.py", line 2227, in terminate
> ImportError: sys.meta_path is None, Python is likely shutting down
>
> Use the `with` statement to limit the scope of git.Repo and ensure
> proper resource management.
>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
checkpatch suddenly broke for me with the same error as shown here and the
patch fixed it.
Tested-by: Duje Mihanović <duje.mihanovic@...le.hr>
Regards,
--
Duje
Powered by blists - more mailing lists