The options hash is only set after options parsing has succeeded however the exception handler expects it to be a hash.
This had the effect of the exception handler raising exceptions and so the final exception was visible to the user Signed-off-by: R.I.Pienaar <[email protected]> --- Local-branch: bug/master/7821 lib/mcollective/application.rb | 2 ++ website/changelog.md | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/mcollective/application.rb b/lib/mcollective/application.rb index 3fac82d..ce26368 100644 --- a/lib/mcollective/application.rb +++ b/lib/mcollective/application.rb @@ -97,6 +97,8 @@ module MCollective # Builds an ObjectParser config, parse the CLI options and validates based # on the option config def application_parse_options + @options ||= {:verbose => false} + @options = rpcoptions do |parser, options| parser.define_head application_description if application_description parser.banner = "" diff --git a/website/changelog.md b/website/changelog.md index 58b971e..059279b 100644 --- a/website/changelog.md +++ b/website/changelog.md @@ -11,6 +11,7 @@ title: Changelog |Date|Description|Ticket| |----|-----------|------| +|2011/06/07|Exceptions raised during option parsing were not handled and resulted in stack traces|7796| |2011/06/07|Add a --version option to the mco command|7822| |2011/06/06|Remove the sshkey, it's being moved to the plugin repository|7794| |2011/06/02|Correct parsing of MCOLLECTIVE_EXTRA_OPTS in cases where no config related settings were set|7755| -- 1.7.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.
