summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-04 13:22:07 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-04 13:22:07 +0100
commit1676309374dc39286024d6c526e6992e2c60926e (patch)
tree3e2f69beac0674b09121309b5d0d8c3e79da6639
parent042b65037fbea425e60ed07a9335cbc4734c6f51 (diff)
IRIS: show no timetable / no schedule in devmode
-rw-r--r--lib/Travel/Status/DE/IRIS.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index f527341..4b5745a 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -491,6 +491,9 @@ sub get_station {
my $station_node = ( $xml_st->findnodes('//station') )[0];
if ( not $station_node ) {
+ if ( $self->{developer_mode} ) {
+ say ' no timetable';
+ }
if ( $opt{root} ) {
$self->{errstr}
= "Station '$station' has no associated timetable";
@@ -682,6 +685,12 @@ sub get_timetable {
$self->add_result( $station, $eva, $s );
}
+ if ( $self->{developer_mode}
+ and not scalar $xml->findnodes('/timetable/s') )
+ {
+ say ' no scheduled trains';
+ }
+
return $self;
}