diff options
Diffstat (limited to 'kvmd/clients')
-rw-r--r-- | kvmd/clients/kvmd.py | 8 | ||||
-rw-r--r-- | kvmd/clients/streamer.py | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/kvmd/clients/kvmd.py b/kvmd/clients/kvmd.py index 569fb9d0..ff8581ef 100644 --- a/kvmd/clients/kvmd.py +++ b/kvmd/clients/kvmd.py @@ -66,8 +66,8 @@ class _AuthApiPart(_BaseApiPart): async with session.get(self._make_url("auth/check")) as response: htclient.raise_not_200(response) return True - except aiohttp.ClientResponseError as err: - if err.status in [400, 401, 403]: + except aiohttp.ClientResponseError as ex: + if ex.status in [400, 401, 403]: return False raise @@ -128,8 +128,8 @@ class _AtxApiPart(_BaseApiPart): ) as response: htclient.raise_not_200(response) return True - except aiohttp.ClientResponseError as err: - if err.status == 409: + except aiohttp.ClientResponseError as ex: + if ex.status == 409: return False raise diff --git a/kvmd/clients/streamer.py b/kvmd/clients/streamer.py index 1d8cd601..fdc855bb 100644 --- a/kvmd/clients/streamer.py +++ b/kvmd/clients/streamer.py @@ -72,10 +72,10 @@ class BaseStreamerClient: def _http_handle_errors() -> Generator[None, None, None]: try: yield - except Exception as err: # Тут бывают и ассерты, и KeyError, и прочая херня - if isinstance(err, StreamerTempError): + except Exception as ex: # Тут бывают и ассерты, и KeyError, и прочая херня + if isinstance(ex, StreamerTempError): raise - raise StreamerTempError(tools.efmt(err)) + raise StreamerTempError(tools.efmt(ex)) class HttpStreamerClient(BaseStreamerClient): @@ -167,10 +167,10 @@ def _memsink_handle_errors() -> Generator[None, None, None]: yield except StreamerPermError: raise - except FileNotFoundError as err: - raise StreamerTempError(tools.efmt(err)) - except Exception as err: - raise StreamerPermError(tools.efmt(err)) + except FileNotFoundError as ex: + raise StreamerTempError(tools.efmt(ex)) + except Exception as ex: + raise StreamerPermError(tools.efmt(ex)) class MemsinkStreamerClient(BaseStreamerClient): |