[PATCH] bareboxtlv-generator: make compatible to python < 3.12
Sascha Hauer
s.hauer at pengutronix.de
Thu Mar 12 03:11:39 PDT 2026
Older python versions < 3.12 do not allow nested " in f-strings. Use '
instead.
Signed-off-by: Sascha Hauer <s.hauer at 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
More information about the barebox
mailing list