From 9a8daf665e25505f2a0080efda654c2d3ec289eb Mon Sep 17 00:00:00 2001 From: Athanasius <github@miggy.org> Date: Thu, 25 Mar 2021 12:03:19 +0000 Subject: [PATCH] EDDN: Restore 4.2.4 is_horizons() check in full --- plugins/eddn.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 7b9d5241..32ba121e 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -853,10 +853,14 @@ def is_horizons(economies: MAP_STR_ANY, modules: MAP_STR_ANY, ships: MAP_STR_ANY if isinstance(ships, dict): if ships.get('shipyard_list') is not None: - ship_horizons = any(ship.get('sku') == HORIZ_SKU for ship in ships['shipyard_list'].values()) + if isinstance(ships.get('shipyard_list'), dict): + ship_horizons = any(ship.get('sku') == HORIZ_SKU for ship in ships['shipyard_list'].values()) + + else: + logger.debug('ships["shipyard_list"] is not dict - FC or Damaged Station?') else: - logger.debug('No ships["shipyard_list"] - Damaged station or FC ?') + logger.debug('ships["shipyard_list"] is None - FC or Damaged Station?') else: logger.error(f'ships type is {type(ships)}')