[elbe-devel] [PATCH v3 60/75] xmldefaults: use f-strings

Daniel Braunwarth daniel at braunwarth.dev
Sun Nov 6 22:12:39 CET 2022


Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
---
 elbepack/xmldefaults.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/xmldefaults.py b/elbepack/xmldefaults.py
index edbfa10d8..493519a29 100644
--- a/elbepack/xmldefaults.py
+++ b/elbepack/xmldefaults.py
@@ -180,7 +180,7 @@ def get_random_mac():
     binaddr = [random.randint(0, 255) for _ in range(6)]
     binaddr[0] &= 0xfe
     binaddr[0] |= 0x02
-    s = ["%02x" % x for x in binaddr]
+    s = [f"{x:02x}" for x in binaddr]
 
     return ':'.join(s)
 
-- 
2.38.1



More information about the elbe-devel mailing list