mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-16 07:50:16 +02:00
Change esi client loading to on-demand in eveonline module
This commit is contained in:
parent
564a25e578
commit
331100370c
@ -151,9 +151,18 @@ class EveProvider(object):
|
||||
|
||||
class EveSwaggerProvider(EveProvider):
|
||||
def __init__(self, token=None, adapter=None):
|
||||
self.client = esi_client_factory(token=token, spec_file=SWAGGER_SPEC_PATH)
|
||||
self._client = None
|
||||
self._token = token
|
||||
self.adapter = adapter or self
|
||||
|
||||
@property
|
||||
def client(self):
|
||||
if self._client is None:
|
||||
self._client = esi_client_factory(
|
||||
token=self._token, spec_file=SWAGGER_SPEC_PATH
|
||||
)
|
||||
return self._client
|
||||
|
||||
def __str__(self):
|
||||
return 'esi'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user