1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 16:27:13 +03:00

[2051] Re-add missing context

It's not a refactor if I don't accidentally nuke a lang comment
This commit is contained in:
David Sangrey 2023-11-30 22:05:59 -05:00
parent 170b86b5dc
commit f30fb56f6e
No known key found for this signature in database
GPG Key ID: 3AEADBB0186884BC
2 changed files with 5 additions and 1 deletions

View File

@ -865,11 +865,15 @@ class Session:
self.dump(response)
if response.status_code == 401:
# TODO: This needs to try a REFRESH, not a full re-auth
# No need for translation, we'll go straight into trying new Auth
# and thus any message would be overwritten.
# CAPI doesn't think we're Auth'd
raise CredentialsRequireRefresh('Frontier CAPI said "unauthorized"')
if response.status_code == 418:
# "I'm a teapot" - used to signal maintenance
# LANG: Frontier CAPI returned 418, meaning down for maintenance
raise ServerError(_("Frontier CAPI down for maintenance"))
logger.exception('Frontier CAPI: Misc. Error')

View File

@ -84,7 +84,7 @@ class Plugin:
else:
logger.info(f'plugin {name} disabled')
def _get_func(self, funcname: str): # Removing Unhelpful Type Hint
def _get_func(self, funcname: str):
"""
Get a function from a plugin.