Skip to contentSkip to conversation

b4 diff -m: max() arg is an empty sequence

DISCUSSION Krzysztof Kozlowski 2 participants 2 messages Sep 20, 2020 – Oct 2, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

$ b4 mbox '[email protected]'
$ b4 mbox '[email protected]'

(the second mbox is actually a cover letter as b4 could not download the actual patch directly via its Message-Id)

$ b4 diff -m [email protected] [email protected]

Loading 8 messages from [email protected] Traceback (most recent call last):
File "/home/kozik/.local/bin/b4", line 11, in <module>

    sys.exit(cmd())

File "/home/kozik/.local/lib/python3.6/site-packages/b4/command.py", line 222, in cmd
cmdargs.func(cmdargs)
File "/home/kozik/.local/lib/python3.6/site-packages/b4/command.py", line 65, in cmd_diff
b4.diff.main(cmdargs)
File "/home/kozik/.local/lib/python3.6/site-packages/b4/diff.py", line 115, in main
lser, user = diff_mboxes(cmdargs)
File "/home/kozik/.local/lib/python3.6/site-packages/b4/diff.py", line 108, in diff_mboxes
chunks.append(lmbx.series[max(lmbx.series.keys())])
ValueError: max() arg is an empty sequence

Ubuntu 18.04.5
Python 3.6.9
b4 0.5.2

Best regards,
Krzysztof

#1 lore raw
Quoted 14 lines · Krzysztof Kozlowski

Hi,

$ b4 mbox '[email protected]'
$ b4 mbox '[email protected]'

(the second mbox is actually a cover letter as b4 could not download the actual patch directly via its Message-Id)

$ b4 diff -m [email protected] [email protected]

Loading 8 messages from [email protected] Traceback (most recent call last):
File "/home/kozik/.local/bin/b4", line 11, in <module>

    sys.exit(cmd())
Quoted 9 lines

File "/home/kozik/.local/lib/python3.6/site-packages/b4/command.py", line 222, in cmd
cmdargs.func(cmdargs)
File "/home/kozik/.local/lib/python3.6/site-packages/b4/command.py", line 65, in cmd_diff
b4.diff.main(cmdargs)
File "/home/kozik/.local/lib/python3.6/site-packages/b4/diff.py", line 115, in main
lser, user = diff_mboxes(cmdargs)
File "/home/kozik/.local/lib/python3.6/site-packages/b4/diff.py", line 108, in diff_mboxes
chunks.append(lmbx.series[max(lmbx.series.keys())])
ValueError: max() arg is an empty sequence

Thanks, this crasher is now fixed in master and stable-0.5.y:

$ b4 diff -m [email protected] [email protected]
Loading 8 messages from [email protected]
No valid patches found in [email protected]

-K