]> gitweb.michael.orlitzky.com - mailshears.git/commitdiff
Be silent if the user does not have a configuration file.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 9 Apr 2012 01:05:33 +0000 (21:05 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 9 Apr 2012 01:05:33 +0000 (21:05 -0400)
lib/mailshears.rb

index 30dd71ebc99130aeb0c128a7433fee5d244b57da..0402d602be047da95203f6fab5391bb2850a1171 100644 (file)
@@ -8,13 +8,11 @@ require 'mailshears/postfixadmin_db'
 # Load the default config file first, and let the user override it.
 require 'default_configuration'
 
+userconf_path = ENV['HOME'] + '/.mailshears.conf'
 begin
-  # Try to load the user's configuration file.
-  userconf_path = ENV['HOME'] + '/.mailshears.conf'
+  # Don't crash if it doesn't exist. Maybe he likes the defaults?
   require userconf_path
-rescue
-  puts 'No user configuration file (~/.mailshears.conf) found.'
-  puts 'Continuing...'
+rescue LoadError
 end
 
 Configuration::PLUGINS.each do |plugin_file|