1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-18 09:57:40 +03:00

Handle missing station name better.

This commit is contained in:
Jonathan Harris 2015-06-06 12:13:58 +01:00
parent 05635362b6
commit b18faeb996

View File

@ -150,9 +150,9 @@ class AppWindow:
self.status['text'] = "Who are you?!" # Shouldn't happen self.status['text'] = "Who are you?!" # Shouldn't happen
elif not data['commander'].get('docked'): elif not data['commander'].get('docked'):
self.status['text'] = "You're not docked at a station!" 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 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!" self.status['text'] = "Station doesn't have a market!"
else: else:
if config.getint('output') & config.OUT_CSV: if config.getint('output') & config.OUT_CSV: