~ubuntu-branches/ubuntu/oneiric/mcollective/oneiric-proposed

« back to all changes in this revision

Viewing changes to lib/mcollective/rpc.rb

  • Committer: Bazaar Package Importer
  • Author(s): Marc Cluet, Marc Cluet, Chuck Short
  • Date: 2011-05-05 07:37:54 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110505073754-klk1jkz8afi4fomx
Tags: 1.2.0-0ubuntu1
[Marc Cluet]
* Update to 1.2.0
* Build for Oneiric.

[Chuck Short]
* Drop ruby from mcollective, mcollective-middleware, mcollective-client
  since its a dependency of mcollective-common.
* Bump standards to 3.9.2.
* Fix up lintian warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        autoload :DDL, "mcollective/rpc/ddl"
16
16
        autoload :Result, "mcollective/rpc/result"
17
17
        autoload :Helpers, "mcollective/rpc/helpers"
 
18
        autoload :ActionRunner, "mcollective/rpc/actionrunner"
18
19
 
19
20
        # Creates a standard options hash, pass in a block to add extra headings etc
20
21
        # see Optionparser
131
132
            verbose = flags[:verbose] || verbose
132
133
            flatten = flags[:flatten] || false
133
134
 
134
 
            puts
135
 
            puts Helpers.rpcresults(result, {:verbose => verbose, :flatten => flatten})
 
135
            result_text =  Helpers.rpcresults(result, {:verbose => verbose, :flatten => flatten})
 
136
 
 
137
            if result.is_a?(Array)
 
138
                puts "\n%s\n" % [ result_text ]
 
139
            else
 
140
                # when we get just one result to print dont pad them all with
 
141
                # blank spaces etc, just print the individual result with no
 
142
                # padding
 
143
                puts result_text unless result_text == ""
 
144
            end
136
145
        end
137
146
 
138
147
        # Wrapper for MCollective::Util.empty_filter? to make clients less fugly