diff options
| author | Luke Kanies <luke@madstop.com> | 2008-07-29 00:46:11 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-07-29 00:46:11 -0500 |
| commit | 40375a8fc34dbd85d87f507ba72c7394b25b7271 (patch) | |
| tree | efd5a93980b042b73322bd31e6fdb41203d07576 /lib/puppet/network/handler | |
| parent | 93eeff59d807261ed154cc104e318ae604602430 (diff) | |
| parent | 8f5800f0608dff46407cb5f23ee73f314fe051e8 (diff) | |
| download | puppet-40375a8fc34dbd85d87f507ba72c7394b25b7271.tar.gz puppet-40375a8fc34dbd85d87f507ba72c7394b25b7271.tar.xz puppet-40375a8fc34dbd85d87f507ba72c7394b25b7271.zip | |
Merge branch '0.24.x' into merging
Conflicts:
test/ral/type/filesources.rb
Diffstat (limited to 'lib/puppet/network/handler')
| -rw-r--r-- | lib/puppet/network/handler/master.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index a050b089b..9682c460e 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -64,7 +64,14 @@ class Puppet::Network::Handler catalog = Puppet::Node::Catalog.find(client) - return translate(catalog.extract) + case format + when "yaml": + return CGI.escape(catalog.extract.to_yaml(:UseBlock => true)) + when "marshal": + return CGI.escape(Marshal.dump(catalog.extract)) + else + raise "Invalid markup format '%s'" % format + end end # @@ -90,11 +97,6 @@ class Puppet::Network::Handler # Translate our configuration appropriately for sending back to a client. def translate(config) - if local? - config - else - CGI.escape(config.to_yaml(:UseBlock => true)) - end end end end |
