Fix format strings

This commit is contained in:
Paul Bienkowski 2022-02-18 10:30:43 +01:00
parent b66784f1ed
commit 96642d2255

View file

@ -25,7 +25,7 @@ def get_single_arg(req, name, default=RAISE, convert=None):
value = req.args[name][0] value = req.args[name][0]
except LookupError as e: except LookupError as e:
if default is RAISE: if default is RAISE:
raise InvalidUsage("missing `{name}`") from e raise InvalidUsage(f"missing `{name}`") from e
value = default value = default
@ -33,7 +33,7 @@ def get_single_arg(req, name, default=RAISE, convert=None):
try: try:
value = convert(value) value = convert(value)
except (ValueError, TypeError) as e: except (ValueError, TypeError) as e:
raise InvalidUsage("invalid `{name}`") from e raise InvalidUsage(f"invalid `{name}`") from e
return value return value