diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-08 15:56:26 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-08 15:56:26 +0000 |
| commit | 195f2e93b603ff873c4de36016b3543df62549e0 (patch) | |
| tree | d22be4aa3deeccaa5552b3ed6b122b0382a0a00d | |
| parent | 59992b5e32ef24b46b54772884e4189ac28ad323 (diff) | |
wrapping all work in a single rescue clause
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@877 980ebf18-57e1-0310-9a29-db15c13687c0
| -rwxr-xr-x | bin/puppet | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/bin/puppet b/bin/puppet index 938877dc3..44c500f6a 100755 --- a/bin/puppet +++ b/bin/puppet @@ -144,30 +144,19 @@ master[:File] = ARGV.shift begin server = Puppet::Server::Master.new(master) -rescue => detail - $stderr.puts detail - exit(1) -end - -begin client = Puppet::Client::MasterClient.new( :Master => server, :Cache => false ) -rescue => detail - $stderr.puts detail - exit(1) -end - - -if parseonly - exit(0) -end - -begin + if parseonly + exit(0) + end client.getconfig client.apply rescue => detail - Puppet.err detail + $stderr.puts detail + if Puppet[:debug] + puts detail.backtrace + end exit(1) end |
