[elbe-devel] [PATCH v2 16/75] repodir: use f-strings

Daniel Braunwarth daniel at braunwarth.dev
Wed Nov 2 20:13:58 CET 2022


Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
---
 elbepack/commands/repodir.py | 2 +-
 elbepack/repodir.py          | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/elbepack/commands/repodir.py b/elbepack/commands/repodir.py
index 90441f2b7..a991e5484 100644
--- a/elbepack/commands/repodir.py
+++ b/elbepack/commands/repodir.py
@@ -23,7 +23,7 @@ def run_command(argv):
 
     xml_input = args[0]
     if not os.path.isfile(xml_input):
-        print("%s does not exist" % xml_input, file=sys.stderr)
+        print(f"{xml_input} does not exist", file=sys.stderr)
         sys.exit(20)
 
     if os.path.exists(opt.output):
diff --git a/elbepack/repodir.py b/elbepack/repodir.py
index 9df2f6369..96a212be4 100644
--- a/elbepack/repodir.py
+++ b/elbepack/repodir.py
@@ -49,7 +49,8 @@ def preprocess_repodir(xml, xmldir):
                 auth_el = Element("raw-key")
                 auth_el.text = "\n" + open(keyfile, encoding='ascii').read()
             except:
-                raise RepodirError("%s is not a valid ascii-armored OpenPGP keyring" % keyfile)
+                raise RepodirError(
+                    f"{keyfile} is not a valid ascii-armored OpenPGP keyring")
         else:
             auth_el = Element("options")
             option_el = Element("option")
-- 
2.38.1



More information about the elbe-devel mailing list