]> git.donarmstrong.com Git - debbugs.git/commitdiff
warn if there isn't a configuration file, but continue
authorDon Armstrong <don@donarmstrong.com>
Mon, 17 Aug 2009 20:20:01 +0000 (13:20 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 17 Aug 2009 20:20:01 +0000 (13:20 -0700)
Debbugs/Config.pm

index eeea7641a4a21fea55a53fa8a28ea9f14f7d5699..b75bd0b16ec3b515a4ae4a602f8acd3f52964f04 100644 (file)
@@ -991,6 +991,10 @@ set_default(\%config,'html_expire_note',
 
 sub read_config{
      my ($conf_file) = @_;
+     if (not -e $conf_file) {
+        print STDERR "configuration file '$conf_file' doesn't exist; skipping it";
+        return;
+     }
      # first, figure out what type of file we're reading in.
      my $fh = new IO::File $conf_file,'r'
          or die "Unable to open configuration file $conf_file for reading: $!";