* [PATCH] bareboxtlv-generator: make compatible to python < 3.12
@ 2026-03-12 10:11 Sascha Hauer
2026-03-12 11:01 ` Jonas Rebmann
2026-03-13 14:48 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-03-12 10:11 UTC (permalink / raw)
To: Barebox List
Older python versions < 3.12 do not allow nested " in f-strings. Use '
instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
scripts/bareboxtlv-generator/bareboxtlv-generator.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/bareboxtlv-generator/bareboxtlv-generator.py b/scripts/bareboxtlv-generator/bareboxtlv-generator.py
index 2eba0aeb23..806d2d8b94 100755
--- a/scripts/bareboxtlv-generator/bareboxtlv-generator.py
+++ b/scripts/bareboxtlv-generator/bareboxtlv-generator.py
@@ -327,7 +327,7 @@ class FactoryDataset:
raise ValueError(f"{name}: Invalid hex string for bytes format")
if "length" in tag:
if tag["length"]!=len(bin):
- raise ValueError(f"{name}: schema requires this byte sequence to be {tag["length"]} bytes but the given sequence is {len(bin)} byte long.")
+ raise ValueError(f"{name}: schema requires this byte sequence to be {tag['length']} bytes but the given sequence is {len(bin)} byte long.")
fmt = f"{len(bin)}s"
if len(bin) > 2**16 - 1:
raise ValueError(f"Bytes {name} is too long!")
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bareboxtlv-generator: make compatible to python < 3.12
2026-03-12 10:11 [PATCH] bareboxtlv-generator: make compatible to python < 3.12 Sascha Hauer
@ 2026-03-12 11:01 ` Jonas Rebmann
2026-03-13 14:48 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Jonas Rebmann @ 2026-03-12 11:01 UTC (permalink / raw)
To: Sascha Hauer, Barebox List
On 2026-03-12 11:11, Sascha Hauer wrote:
> Older python versions < 3.12 do not allow nested " in f-strings. Use '
> instead.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Jonas Rebmann <jre@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bareboxtlv-generator: make compatible to python < 3.12
2026-03-12 10:11 [PATCH] bareboxtlv-generator: make compatible to python < 3.12 Sascha Hauer
2026-03-12 11:01 ` Jonas Rebmann
@ 2026-03-13 14:48 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-03-13 14:48 UTC (permalink / raw)
To: Barebox List, Sascha Hauer
On Thu, 12 Mar 2026 11:11:39 +0100, Sascha Hauer wrote:
> Older python versions < 3.12 do not allow nested " in f-strings. Use '
> instead.
>
>
Applied, thanks!
[1/1] bareboxtlv-generator: make compatible to python < 3.12
https://git.pengutronix.de/cgit/barebox/commit/?id=2855f1dcf230 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-13 14:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-12 10:11 [PATCH] bareboxtlv-generator: make compatible to python < 3.12 Sascha Hauer
2026-03-12 11:01 ` Jonas Rebmann
2026-03-13 14:48 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox