diff options
-rwxr-xr-x | stats.pl | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -37,7 +37,7 @@ my @group_names = (); my $content = get($score_url); if (!defined($content) || !$content || length $content < 1) { print STDERR "Could not fetch scoreboard!"; - exit 1 + exit 1; } my $now = `date +%Y%m%d-%H%M%S`; @@ -48,6 +48,11 @@ close FH; my @content = split /^-+$/m, $content; shift @content; +if (scalar @content < 1) { + print STDERR, "Scoreboard seems to be empty!"; + exit 1; +} + for my $section (@content) { my ($position, $user, $balance, $endpoint, $time_up, $time_maint, $time_down) = (undef); |