From f144c199ae4e8f2088023b878860d1f6bc08b56c Mon Sep 17 00:00:00 2001
From: Athanasius <github@miggy.org>
Date: Tue, 1 Feb 2022 16:12:05 +0000
Subject: [PATCH] eddn: Be paranoid about Status.json BodyName value

---
 plugins/eddn.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/plugins/eddn.py b/plugins/eddn.py
index 5eefc46a..95317c3c 100644
--- a/plugins/eddn.py
+++ b/plugins/eddn.py
@@ -1596,10 +1596,12 @@ def dashboard_entry(cmdr: str, is_beta: bool, entry: Dict[str, Any]) -> None:
     :param is_beta: Whether non-live game version was detected.
     :param entry: The latest Status.json data.
     """
+    this.status_body_name = None
     if 'BodyName' in entry:
-        this.status_body_name = entry['BodyName']
+        if not isinstance(entry['BodyName'], str):
+            logger.warning(f'BodyName was present but not a string! "{entry["BodyName"]}"')
 
-    else:
-        this.status_body_name = None
+        else:
+            this.status_body_name = entry['BodyName']
 
     tracking_ui_update()