[elbe-devel] [PATCH v2 61/75] updatepkg: use f-strings
Daniel Braunwarth
daniel at braunwarth.dev
Wed Nov 2 20:14:43 CET 2022
Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
---
elbepack/updatepkg.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/elbepack/updatepkg.py b/elbepack/updatepkg.py
index 8706ac060..1cb9cfaab 100644
--- a/elbepack/updatepkg.py
+++ b/elbepack/updatepkg.py
@@ -107,7 +107,7 @@ def gen_update_pkg(project, xml_filename, upd_filename,
if os.path.exists(update):
rmtree(update)
- system('mkdir -p %s' % update)
+ system(f"mkdir -p {update}")
if xml_filename:
repodir = os.path.join(update, "repo")
@@ -126,8 +126,7 @@ def gen_update_pkg(project, xml_filename, upd_filename,
dump_fullpkgs(project.xml, project.buildenv.rfs, cache)
project.xml.xml.write(os.path.join(update, "new.xml"))
- system("cp %s %s" % (xml_filename,
- os.path.join(update, "base.xml")))
+ system(f"cp {xml_filename} {os.path.join(update, 'base.xml')}")
else:
system("cp source.xml update/new.xml")
@@ -149,7 +148,6 @@ def gen_update_pkg(project, xml_filename, upd_filename,
if project.postbuild_file:
logging.info("Postbuild script")
- cmd = ' "%s %s %s"' % (upd_filename,
- project.xml.text("project/version"),
- project.xml.text("project/name"))
+ cmd = (f' "{upd_filename} {project.xml.text("project/version")} '
+ f'{project.xml.text("project/name")}"')
do(project.postbuild_file + cmd, allow_fail=True)
--
2.38.1
More information about the elbe-devel
mailing list