Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
* b4: shazam: UnboundLocalError
@ 2025-09-30 12:18 Marc Kleine-Budde
  2025-09-30 12:58 ` Konstantin Ryabitsev
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2025-09-30 12:18 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: users, tools, kernel

[-- Attachment #1: Type: text/plain, Size: 2543 bytes --]

Hello,

current b4 master crashes like this during shazam ("am" works though):

| $ b4 shazam 20250930-gs-usb-max-if-v5-1-863330bf6666@coelacanthus.name
| Grabbing thread from lore.kernel.org/all/20250930-gs-usb-max-if-v5-1-863330bf6666@coelacanthus.name/t.mbox.gz
| Checking for newer revisions
| Grabbing search results from lore.kernel.org
| Analyzing 8 messages in the thread
| Analyzing 1 code-review messages
| Traceback (most recent call last):
|   File "/home/frogger/local/git/b4/src/b4/command.py", line 450, in <module>
|     cmd()
|     ~~~^^
|   File "/home/frogger/local/git/b4/src/b4/command.py", line 433, in cmd
|     cmdargs.func(cmdargs)
|     ~~~~~~~~~~~~^^^^^^^^^
|   File "/home/frogger/local/git/b4/src/b4/command.py", line 105, in cmd_shazam
|     b4.mbox.main(cmdargs)
|     ~~~~~~~~~~~~^^^^^^^^^
|   File "/home/frogger/local/git/b4/src/b4/mbox.py", line 854, in main
|     make_am(msgs, cmdargs, msgid)
|     ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/frogger/local/git/b4/src/b4/mbox.py", line 113, in make_am
|     lser = lmbx.get_series(revision=wantver, sloppytrailers=cmdargs.sloppytrailers, reroll=reroll,
|                            codereview_trailers=load_codereview)
|   File "/home/frogger/local/git/b4/src/b4/__init__.py", line 362, in get_series
|     if pmsg is None:
|        ^^^^
| UnboundLocalError: cannot access local variable 'pmsg' where it is not associated with a value

| $ b4 --version
| 0.15-dev-56183

I've bisected the problem to:

| 8633c7e830a5a75b6e34593cda98d0b6c0b1bb05 is the first bad commit
| commit 8633c7e830a5a75b6e34593cda98d0b6c0b1bb05
| Author: Tamir Duberstein <tamird@gmail.com>
| Date:   Fri Jun 6 15:51:19 2025 -0400
|
|     Check variables for None rather than exprs
|
|     This allows type checkers to better understand that these variables
|     can't be None.
|
|     Signed-off-by: Tamir Duberstein <tamird@gmail.com>
|     Link: https://patch.msgid.link/20250606-uv-compat-v1-8-c76c1c8d6eeb@gmail.com
|     Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|  src/b4/__init__.py | 21 ++++++++++++---------
|  1 file changed, 12 insertions(+), 9 deletions(-)

| $ python3 --version
| Python 3.13.7

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-30 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-30 12:18 b4: shazam: UnboundLocalError Marc Kleine-Budde
2025-09-30 12:58 ` Konstantin Ryabitsev
2025-09-30 13:00 ` Bugspray Bot
2025-09-30 13:10 ` Bugspray Bot
2025-09-30 13:24   ` Marc Kleine-Budde
2025-09-30 13:26 ` Rob Herring
2025-09-30 14:34   ` Konstantin Ryabitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox