CAPI: Log if no commander in profile() data

This commit is contained in:
Athanasius committed 2021-03-06 18:54:24 +00:00
1 parent 67a91cf7d1
commit 71858357eb
1 file changed
+5 -1
+5 -1
View File
@@ -527,7 +527,11 @@ class Session(object):
def profile(self) -> CAPIData:
"""Perform general CAPI /profile endpoint query."""
return self.query(URL_QUERY)
data = self.query(URL_QUERY)
if 'commander' not in data:
logger.error('No commander in returned data')
return data
def station(self) -> CAPIData:
"""Perform CAPI /profile endpoint query for station data."""