Be more fault-tolerant when reading checkgroups.
* Accept lines starting with whitespace. * Drop empty "groups", i.e. lines containing only whitespace. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
0dc13b3980
commit
7662b1065e
|
@ -230,8 +230,9 @@ sub ReadGroupList {
|
||||||
my %ValidGroups;
|
my %ValidGroups;
|
||||||
open (my $LIST,"<$Filename") or &Bleat(2,"Cannot read $Filename: $!");
|
open (my $LIST,"<$Filename") or &Bleat(2,"Cannot read $Filename: $!");
|
||||||
while (<$LIST>) {
|
while (<$LIST>) {
|
||||||
s/^(\S+).*$/$1/;
|
s/^\s*(\S+).*$/$1/;
|
||||||
chomp;
|
chomp;
|
||||||
|
next if /^$/;
|
||||||
$ValidGroups{$_} = '1';
|
$ValidGroups{$_} = '1';
|
||||||
};
|
};
|
||||||
close $LIST;
|
close $LIST;
|
||||||
|
|
Loading…
Reference in a new issue