From 4bba2b2ab0d6a00403afe8bc7575f74d45393bf9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 8 Dec 2011 21:00:20 +0000 Subject: mog: config parser cleanup --- bin/mog | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/mog b/bin/mog index 4121459..6ca3ca5 100755 --- a/bin/mog +++ b/bin/mog @@ -14,8 +14,7 @@ if md5_trailer_nodes = ENV["MD5_TRAILER_NODES"] end # this is to be compatible with config files used by the Perl tools -def parse_config_file!(path, overwrite = false) - dest = {} +def parse_config_file!(path, dest = {}) File.open(path).each_line do |line| case line when /^(domain|class)\s*=\s*(\S+)/ @@ -79,7 +78,7 @@ ARGV.options do |x| end # parse the config file specified at the command-line -file_cfg = config_file ? parse_config_file!(config_file, true) : {} +file_cfg = config_file ? parse_config_file!(config_file) : {} # read environment variables, too. This Ruby API favors the term # "hosts", however upstream MogileFS teminology favors "trackers" instead. -- cgit v1.2.3-24-ge0c7