mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [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

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