[elbe-devel] [PATCH 14/75] prjrepo: use f-strings
Daniel Braunwarth
daniel at braunwarth.dev
Wed Nov 2 20:01:24 CET 2022
Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
---
elbepack/commands/prjrepo.py | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/elbepack/commands/prjrepo.py b/elbepack/commands/prjrepo.py
index 985ba73cf..248829114 100644
--- a/elbepack/commands/prjrepo.py
+++ b/elbepack/commands/prjrepo.py
@@ -75,15 +75,17 @@ def run_command(argv):
retries=int(
opt.retries))
except URLError as e:
- print("Failed to connect to Soap server %s:%s\n" %
- (opt.host, opt.port), file=sys.stderr)
+ print(
+ f"Failed to connect to Soap server {opt.host}:{opt.port}\n",
+ file=sys.stderr)
print("", file=sys.stderr)
print("Check, wether the initvm is actually running.", file=sys.stderr)
print("try `elbe initvm start`", file=sys.stderr)
sys.exit(10)
except socket.error as e:
- print("Failed to connect to Soap server %s:%s\n" %
- (opt.host, opt.port), file=sys.stderr)
+ print(
+ f"Failed to connect to Soap server {opt.host}:{opt.port}\n",
+ file=sys.stderr)
print("", file=sys.stderr)
print(
"Check, wether the Soap Server is running inside the initvm",
@@ -91,8 +93,9 @@ def run_command(argv):
print("try 'elbe initvm attach'", file=sys.stderr)
sys.exit(10)
except BadStatusLine as e:
- print("Failed to connect to Soap server %s:%s\n" %
- (opt.host, opt.port), file=sys.stderr)
+ print(
+ f"Failed to connect to Soap server {opt.host}:{opt.port}\n",
+ file=sys.stderr)
print("", file=sys.stderr)
print("Check, wether the initvm is actually running.", file=sys.stderr)
print(
@@ -104,11 +107,12 @@ def run_command(argv):
try:
v_server = control.service.get_version()
if v_server != elbe_version:
- print("elbe v%s is used in initvm, this is not compatible witha"
- "elbe v%s that is used on this machine. Please install same "
- "versions of elbe in initvm and on your machine." % (
- v_server, elbe_version),
- file=sys.stderr)
+ print(
+ f"elbe v{v_server} is used in initvm, this is not compatible "
+ f"with elbe v{elbe_version} that is used on this machine. "
+ "Please install same versions of elbe in initvm and on your "
+ "machine.",
+ file=sys.stderr)
if not opt.ignore_version:
sys.exit(20)
--
2.38.1
More information about the elbe-devel
mailing list