summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-11-19 21:17:30 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-11-19 21:17:30 +0100
commit9a07392b923b5811e048f976f42d308dbafa8ade (patch)
tree07a98dda6cb35ba6bdf9eb2b95434c27f7d01385 /lib/Travel
parent6ee3e6cfe598b605e67d1bdc29d59c3564d0b692 (diff)
Parse lines without routeDescText
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/VRR.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index dd149e8..3fe437f 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -168,8 +168,9 @@ sub lines {
my $e_route = ( $e->findnodes($xp_route) )[0];
my $e_oper = ( $e->findnodes($xp_oper) )[0];
- if ( not( $e_info and $e_route and $e_oper ) ) {
- cluck('node with insufficient data. This should not happen');
+ if ( not( $e_info and $e_oper ) ) {
+ cluck( 'node with insufficient data. This should not happen. '
+ . $e->getAttribute('number') );
next;
}
@@ -177,7 +178,7 @@ sub lines {
my $direction = $e->getAttribute('direction');
my $valid = $e->getAttribute('valid');
my $type = $e_info->getAttribute('name');
- my $route = $e_route->textContent;
+ my $route = ( $e_route ? $e_route->textContent : undef );
my $operator = $e_oper->textContent;
my $identifier = $e->getAttribute('stateless');