Report when system wasn't known to EDSM.
authorCMDR furrycat <elite@furrycat.net>
Sun, 5 Nov 2017 23:03:14 +0000 (23:03 +0000)
committerCMDR furrycat <elite@furrycat.net>
Sun, 5 Nov 2017 23:03:14 +0000 (23:03 +0000)
load.py

diff --git a/load.py b/load.py
index 535be41..2e04f36 100644 (file)
--- a/load.py
+++ b/load.py
@@ -126,10 +126,14 @@ def edsm_query(system):
     this.edsm_data = None
 
 def edsm_callback(event):
-  if this.edsm_data is not None:
+  if this.edsm_data is None:
+    return
+  if len(this.edsm_data):
     star = this.edsm_data.get('primaryStar', None)
     if star is None:
       arrival_star_unknown()
     else:
       this.cache[this.edsm_data.get('name')] = star['type']
       arrival_star_known(star['type'])
+  else:
+    arrival_star_known('Unknown system')