summaryrefslogtreecommitdiff
path: root/src/waitress/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/waitress/runner.py')
-rw-r--r--src/waitress/runner.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/waitress/runner.py b/src/waitress/runner.py
index 9a5f0e3..22f70f3 100644
--- a/src/waitress/runner.py
+++ b/src/waitress/runner.py
@@ -198,7 +198,7 @@ RUNNER_PATTERN = re.compile(
def match(obj_name):
matches = RUNNER_PATTERN.match(obj_name)
if not matches:
- raise ValueError("Malformed application '{}'".format(obj_name))
+ raise ValueError(f"Malformed application '{obj_name}'")
return matches.group("module"), matches.group("object")
@@ -223,7 +223,7 @@ def resolve(module_name, object_name):
def show_help(stream, name, error=None): # pragma: no cover
if error is not None:
- print("Error: {}\n".format(error), file=stream)
+ print(f"Error: {error}\n", file=stream)
print(HELP.format(name), file=stream)
@@ -239,7 +239,7 @@ def show_exception(stream):
if args:
print("It had these arguments: ", file=stream)
for idx, arg in enumerate(args, start=1):
- print("{}. {}\n".format(idx, arg), file=stream)
+ print(f"{idx}. {arg}\n", file=stream)
else:
print("It had no arguments.", file=stream)
@@ -282,11 +282,11 @@ def run(argv=sys.argv, _serve=serve):
try:
app = resolve(module, obj_name)
except ImportError:
- show_help(sys.stderr, name, "Bad module '{}'".format(module))
+ show_help(sys.stderr, name, f"Bad module '{module}'")
show_exception(sys.stderr)
return 1
except AttributeError:
- show_help(sys.stderr, name, "Bad object name '{}'".format(obj_name))
+ show_help(sys.stderr, name, f"Bad object name '{obj_name}'")
show_exception(sys.stderr)
return 1
if kw["call"]: