Be more fault-tolerant when reading checkgroups.
authorThomas Hochstein <thh@inter.net>
Sun, 27 May 2012 13:33:11 +0000 (15:33 +0200)
committerThomas Hochstein <thh@inter.net>
Fri, 12 Oct 2012 22:52:13 +0000 (00:52 +0200)
* Accept lines starting with whitespace.

* Drop empty "groups", i.e. lines containing only
  whitespace.

Signed-off-by: Thomas Hochstein <thh@inter.net>
NewsStats.pm

index f0a4066..428719e 100644 (file)
@@ -230,8 +230,9 @@ sub ReadGroupList {
   my %ValidGroups;
   open (my $LIST,"<$Filename") or &Bleat(2,"Cannot read $Filename: $!");
   while (<$LIST>) {
-    s/^(\S+).*$/$1/;
+    s/^\s*(\S+).*$/$1/;
     chomp;
+    next if /^$/;
     $ValidGroups{$_} = '1';
   };
   close $LIST;
This page took 0.013159 seconds and 4 git commands to generate.