Fix train type detection

This commit is contained in:
Julian Metzler 2022-05-14 00:27:25 +02:00
parent 2f59da2beb
commit 4ec101f59b
1 changed files with 1 additions and 1 deletions

2
run.py
View File

@ -62,7 +62,7 @@ def update_display(display, dbi):
if train_type == "Bus":
display.info_2.set(BUS_REPLACEMENT_TEXT)
if not train_type[1].isdigit():
if not parts[1][0].isdigit():
# Train number starts with a letter
train_type = parts[0] = parts[1].rstrip("0123456789")
parts[1] = parts[1][len(parts[0]):]