mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-03 00:51:11 +03:00
companion: Change trace_if 'capi-query' to 'capi.query'
This commit is contained in:
parent
021d3a25fa
commit
7149f7e792
@ -554,7 +554,7 @@ class Session(object):
|
|||||||
|
|
||||||
def query(self, endpoint: str) -> CAPIData: # noqa: CCR001
|
def query(self, endpoint: str) -> CAPIData: # noqa: CCR001
|
||||||
"""Perform a query against the specified CAPI endpoint."""
|
"""Perform a query against the specified CAPI endpoint."""
|
||||||
logger.trace_if('capi-query', f'Performing query for endpoint "{endpoint}"')
|
logger.trace_if('capi.query', f'Performing query for endpoint "{endpoint}"')
|
||||||
if self.state == Session.STATE_INIT:
|
if self.state == Session.STATE_INIT:
|
||||||
if self.login():
|
if self.login():
|
||||||
return self.query(endpoint)
|
return self.query(endpoint)
|
||||||
@ -564,7 +564,7 @@ class Session(object):
|
|||||||
raise CredentialsError('cannot make a query when unauthorized')
|
raise CredentialsError('cannot make a query when unauthorized')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
logger.trace_if('capi-query', 'Trying...')
|
logger.trace_if('capi.query', 'Trying...')
|
||||||
r = self.session.get(self.server + endpoint, timeout=timeout) # type: ignore
|
r = self.session.get(self.server + endpoint, timeout=timeout) # type: ignore
|
||||||
|
|
||||||
except requests.ConnectionError as e:
|
except requests.ConnectionError as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user