summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lookup-server6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/lookup-server b/bin/lookup-server
index ea19880..183db48 100755
--- a/bin/lookup-server
+++ b/bin/lookup-server
@@ -36,7 +36,11 @@ class Train:
def __init__(self, train):
self.stopovers = train["previousStopovers"]
self.tripId = train["tripId"]
- self.train_type, self.line_no = train["line"]["name"].split()
+ try:
+ self.train_type, self.line_no = train["line"]["name"].split()
+ except ValueError:
+ self.train_type = train["line"]["name"]
+ self.line_no = ""
self.train_no = train["line"]["fahrtNr"]
self.request_eva = int(train["stop"]["id"])