The problem was that some defaults were nil but had
to be 'false', because xmlrpc can't serialize 'nil'
as an rpc argument.

Signed-off-by: Luke Kanies <[email protected]>
---
 lib/puppet/application/puppetrun.rb |    5 ++++-
 spec/unit/application/puppetrun.rb  |   12 ++++++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/application/puppetrun.rb 
b/lib/puppet/application/puppetrun.rb
index 59ace82..2dbd803 100644
--- a/lib/puppet/application/puppetrun.rb
+++ b/lib/puppet/application/puppetrun.rb
@@ -128,8 +128,9 @@ Puppet::Application.new(:puppetrun) do
 
         print "Triggering %s\n" % host
         begin
-            result = client.run(@tags, options[:ignoreschedules], 
options[:foreground])
+            result = client.run(@tags, options[:ignoreschedules] || false, 
options[:foreground] || false)
         rescue => detail
+            puts detail.backtrace if Puppet[:trace]
             $stderr.puts "Host %s failed: %s\n" % [host, detail]
             exit(2)
         end
@@ -155,6 +156,8 @@ Puppet::Application.new(:puppetrun) do
         options[:parallel] = 1
         options[:verbose] = true
         options[:fqdn] = true
+        options[:ignoreschedules] = false
+        options[:foreground] = false
 
         @hosts = []
         @classes = []
diff --git a/spec/unit/application/puppetrun.rb 
b/spec/unit/application/puppetrun.rb
index 2a8ccb8..d44b406 100755
--- a/spec/unit/application/puppetrun.rb
+++ b/spec/unit/application/puppetrun.rb
@@ -57,6 +57,18 @@ describe "puppetrun" do
 
             @puppetrun.options[:fqdn].should be_true
         end
+
+        it "should set ignoreschedules to 'false'" do
+            @puppetrun.run_preinit
+
+            @puppetrun.options[:ignoreschedules].should be_false
+        end
+
+        it "should set foreground to 'false'" do
+            @puppetrun.run_preinit
+
+            @puppetrun.options[:foreground].should be_false
+        end
     end
 
     describe "when applying options" do
-- 
1.6.1


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to