[elbe-devel] [PATCH v2 23/75] esoap: use f-strings

Daniel Braunwarth daniel at braunwarth.dev
Wed Nov 2 20:14:05 CET 2022


Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
---
 elbepack/daemons/soap/esoap.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index 8f881b593..ba728365e 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -68,7 +68,7 @@ class ESoap (ServiceBase):
                                 'Initvm is in devel mode: installing another\n'
                                 'elbe version will not have any effect.\n')
 
-        pkgs = ['"%s=%s*"' % (p, version) for p in pkglist]
+        pkgs = [F'"{p}={version}*"' for p in pkglist]
 
         # Prevent, that elbe daemon is restarted by the
         # prerm/postinst scripts.
@@ -83,7 +83,8 @@ class ESoap (ServiceBase):
                    'DEBIAN_FRONTEND': 'noninteractive',
                    'DEBCONF_NONINTERACTIVE_SEEN': 'true'}
 
-            cmd = 'apt-get update ; apt-get install -y --allow-downgrades %s' % ' '.join(pkgs)
+            cmd = ("apt-get update; "
+                   "apt-get install -y --allow-downgrades {' '.join(pkgs)}")
 
             ret, out = command_out(cmd, env_add=env)
         finally:
-- 
2.38.1



More information about the elbe-devel mailing list