Commit c392f1e0 authored by Steve Trevanion's avatar Steve Trevanion
Browse files

avoided an exception when parsing conf file

parent bdf98454
......@@ -118,13 +118,12 @@ sub parse_common_options {
"Unable to open configuration file $conffile for reading: $!");
while (<CONF>) {
# remove comments
s/\s+[;].*$//;
s/^[#;].*$//;
s/\s+[;].*$//;
s/^[#;].*$//;
# read options into internal parameter datastructure
/(\w\S*)\s*=\s*(.*)/;
$self->param($1, $2);
}
$self->param($1, $2) if (/(\w\S*)\s*=\s*(.*)/);
}
} else {
warning("Unable to open configuration file $conffile for reading: $!");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment