Skip to content

Commit

Permalink
[BUGFIX] Handle trips with a delay of 0 minutes (yes, that's possible!)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Sep 13, 2024
1 parent 01e8dbc commit b61b718
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metrics_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def collect_trip(self):
# Remove leading plus (+) character from delay information
if isinstance(delay, str) and delay.startswith('+'):
delay = int(delay.lstrip('+'))
else:
delay = 0

# Return delay data if eva number matches with next station
if eva_nr == next_station:
Expand Down

0 comments on commit b61b718

Please sign in to comment.