Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 3, 2024
1 parent 08c5e47 commit a4fc645
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions kubespawner/reflector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import time
from functools import partial

from kubernetes_asyncio import watch, client
from kubernetes_asyncio import client, watch
from traitlets import Any, Bool, Dict, Int, Unicode
from traitlets.config import LoggingConfigurable
from urllib3.exceptions import ReadTimeoutError
Expand Down Expand Up @@ -231,12 +231,13 @@ async def _list_and_update(self, resource_version=None):

initial_resources_raw = await list_method(**kwargs)
if not initial_resources_raw.ok:
self.log.error(f'Error when calling Kubernetes API.'
self.log.error(
f'Error when calling Kubernetes API.'
f' Status: {initial_resources_raw.status} {initial_resources_raw.reason}.'
f' Message: {(await initial_resources_raw.json())["message"]}')
f' Message: {(await initial_resources_raw.json())["message"]}'
)
raise client.ApiException(
status=initial_resources_raw.status,
reason=initial_resources_raw.reason
status=initial_resources_raw.status, reason=initial_resources_raw.reason
)

# This is an atomic operation on the dictionary!
Expand Down

0 comments on commit a4fc645

Please sign in to comment.