From 206367505c4ea0e12989b146e67d50589929af08 Mon Sep 17 00:00:00 2001 From: Athanasius <github@miggy.org> Date: Thu, 26 Aug 2021 15:31:39 +0100 Subject: [PATCH] CAPI: Cleanup some (un)needed translations --- companion.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/companion.py b/companion.py index 4950b74e..f69ae122 100644 --- a/companion.py +++ b/companion.py @@ -763,12 +763,13 @@ class Session(object): self.dump(r) if r.status_code == 401: # CAPI doesn't think we're Auth'd - # TODO: Translation ? + # No need for translation, we'll go straight into trying new Auth + # and thus any message would be overwritten. raise CredentialsError('Frontier CAPI said Auth required') from e if r.status_code == 418: # "I'm a teapot" - used to signal maintenance - # TODO: Translation ? - raise ServerError("Frontier CAPI down for maintenance") from e + # LANG: Frontier CAPI returned 418, meaning down for maintenance + raise ServerError(_("Frontier CAPI down for maintenance")) from e logger.exception('Frontier CAPI: Misc. Error') raise ServerError('Frontier CAPI: Misc. Error') from e @@ -790,8 +791,6 @@ class Session(object): '%Y-%m-%dT%H:%M:%SZ', parsedate(r.headers['Date']) # type: ignore ) - # TODO: Store a copy of this if it was /profile, e.g. for use by - # stats.py return capi_data def capi_station_queries(timeout: int = capi_default_timeout) -> CAPIData: # noqa: CCR001