summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-08 19:45:59 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-04-25 01:19:51 +1000
commita0c1edec69c7eea70fe1ca9f4e0e1dc6fc3d688b (patch)
treeee237f8e09edb2ce697646ff11659c63c979a831 /lib/puppet
parent284cbeb6a6b4b8d633890139b8e5c5319f67bde3 (diff)
downloadpuppet-a0c1edec69c7eea70fe1ca9f4e0e1dc6fc3d688b.tar.gz
puppet-a0c1edec69c7eea70fe1ca9f4e0e1dc6fc3d688b.tar.xz
puppet-a0c1edec69c7eea70fe1ca9f4e0e1dc6fc3d688b.zip
Modifying the Settings#handlearg prototype
I'd made the argument no longer optional because I thought the method was rarely used, but it's used in puppetd a good bit. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/util/settings.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
index f9b9345f3..6a94c0df2 100644
--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -134,7 +134,7 @@ class Puppet::Util::Settings
end
# Handle a command-line argument.
- def handlearg(opt, value)
+ def handlearg(opt, value = nil)
@cache.clear
value = munge_value(value) if value
str = opt.sub(/^--/,'')
@@ -146,7 +146,7 @@ class Puppet::Util::Settings
end
str = str.intern
- if value == ""
+ if value == "" or value.nil?
value = bool
end