From 71858357eb639b65521cef2122a4e82caa642ebf Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 6 Mar 2021 10:54:15 +0000 Subject: [PATCH] CAPI: Log if no commander in profile() data --- companion.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/companion.py b/companion.py index ba8faf1a..850f3a7a 100644 --- a/companion.py +++ b/companion.py @@ -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."""