From: Michael Orlitzky Date: Mon, 9 Dec 2013 16:23:01 +0000 (-0500) Subject: Fix a use of the cfg object before it was created. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=commitdiff_plain;h=1d3fe29831ef6b870974671459c1a6f2c3146371;hp=d2f92616ba7810e98aaeba52c65eb63c8f95adac Fix a use of the cfg object before it was created. --- diff --git a/bin/whatever-dl b/bin/whatever-dl index b3ed1ca..a40af28 100755 --- a/bin/whatever-dl +++ b/bin/whatever-dl @@ -58,6 +58,8 @@ opts.each do |opt, arg| end end +cfg = Configuration.new() + # Warn about nonsensical options. if options[:continue] and not cfg.download_method == 'wget' log.warn("The --continue flag does nothing unless download_method is wget.") @@ -74,8 +76,6 @@ if (ARGV.length < 1) then end -cfg = Configuration.new() - # Factory method. site = Website.create(ARGV[0])