From b18faeb996eab2e0becdd15fa5e7bc5eb8b8c7e8 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Sat, 6 Jun 2015 12:13:58 +0100 Subject: [PATCH] Handle missing station name better. --- EDMarketConnector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index fe2fdf09..f094e6c9 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -150,9 +150,9 @@ class AppWindow: self.status['text'] = "Who are you?!" # Shouldn't happen elif not data['commander'].get('docked'): self.status['text'] = "You're not docked at a station!" - elif not data.get('lastSystem') or not data['lastSystem'].get('name','').strip(): + elif not data.get('lastSystem') or not data['lastSystem'].get('name','').strip() or not data.get('lastStarport') or not data['lastStarport'].get('name','').strip(): self.status['text'] = "Where are you?!" # Shouldn't happen - elif not data.get('lastStarport') or not data['lastStarport'].get('commodities'): + elif not data['lastStarport'].get('commodities'): self.status['text'] = "Station doesn't have a market!" else: if config.getint('output') & config.OUT_CSV: