Black reformat.

This commit is contained in:
Itamar Turner-Trauring 2023-05-01 11:50:05 -04:00
parent 5632e82e13
commit 8c8e24a3b9

View File

@ -117,9 +117,9 @@ def _authorization_decorator(required_secrets):
try:
# Check Authorization header:
if not timing_safe_compare(
request.requestHeaders.getRawHeaders("Authorization", [""])[0].encode(
"utf-8"
),
request.requestHeaders.getRawHeaders("Authorization", [""])[
0
].encode("utf-8"),
swissnum_auth_header(self._swissnum),
):
raise _HTTPError(http.UNAUTHORIZED)
@ -494,6 +494,7 @@ def read_range(
def _add_error_handling(app: Klein):
"""Add exception handlers to a Klein app."""
@app.handle_errors(_HTTPError)
def _http_error(_, request, failure):
"""Handle ``_HTTPError`` exceptions."""