From be541571d9d05105f1c68a04bbc14782370c4602 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Sep 2020 12:48:21 +0100 Subject: [PATCH] companion.py: Return CAPI data if not docked Else at least one caller to .station() blows up when it can't find the commander data. The call has to be to .station() so as to populate the market/shipyard added dictionaries. --- companion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion.py b/companion.py index 3ed92e7b..9176fc2e 100644 --- a/companion.py +++ b/companion.py @@ -534,7 +534,7 @@ class Session(object): """Perform CAPI /profile endpoint query for station data.""" data = self.query(URL_QUERY) if not data['commander'].get('docked'): - return None + return data services = data['lastStarport'].get('services', {})