Fail if the config file cannot be sensibly parsed as an keyfile.

git-svn-id: http://emdebian.org/svn/current@7703 563faec7-e20c-0410-992a-a66f704d0ccd
main
codehelp 14 years ago
parent b07ecbf9f7
commit d605cd7ccb

@ -829,7 +829,10 @@ will be created - it is not packed into a .tgz once complete.
sub cascade {
$file = shift;
$config = Config::Auto::parse($file);
$config = Config::Auto::parse($file, format => 'ini');
if (not defined $config or (scalar keys %$config) == 0) {
die ("$progname: ". _g("Failed to parse '$file'!\n"));
}
foreach $key (%$config) {
$type = lc($key) if (ref $key ne "HASH");
$value = $key if (ref $key eq "HASH");

Loading…
Cancel
Save