mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
Stop complaining about the configuration file missing -- if it is not there then just assume there is nothing to worry about. This makes the output of the initial run with the 'setup' argument a lot quieter.
This commit is contained in:
parent
10dc2574fd
commit
f9a76a2609
@ -147,12 +147,17 @@ sub DESTROY {
|
||||
sub doRead {
|
||||
my $self = shift;
|
||||
my($filename) = @_;
|
||||
local *FILE; # ugh
|
||||
$self->assert(open(FILE, "<$filename"), 1, "Could not open configuration file '$filename' for reading: $!");
|
||||
local $/ = undef; # slurp entire file (no record delimiter)
|
||||
my $settings = <FILE>;
|
||||
$self->assert(close(FILE), 3, "Could not close configuration file '$filename': $!");
|
||||
return $settings;
|
||||
if (-e $filename) {
|
||||
local *FILE; # ugh
|
||||
$self->assert(open(FILE, "<$filename"), 1, "Could not open configuration file '$filename' for reading: $!");
|
||||
local $/ = undef; # slurp entire file (no record delimiter)
|
||||
my $settings = <FILE>;
|
||||
$self->assert(close(FILE), 3, "Could not close configuration file '$filename': $!");
|
||||
return $settings;
|
||||
} else {
|
||||
# file doesn't exist, so no configuration to read in
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
sub doWrite {
|
||||
|
Loading…
Reference in New Issue
Block a user