summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/nvm8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/nvm b/bin/nvm
index bc502ba..3f1c945 100755
--- a/bin/nvm
+++ b/bin/nvm
@@ -92,6 +92,14 @@ class EFA:
except json.decoder.JSONDecodeError:
raise RuntimeError(response) from None
+ if (
+ departures is None
+ or not "departureList" in departures
+ or departures["departureList"] is None
+ ):
+ logging.debug(f"EFA response has no departureList")
+ return list()
+
return list(map(EFADeparture, departures["departureList"]))