Bug #3289
closedlisting templates fail
Description
[lzap@exee ~]$ hammer -v template list
No permissions to create log dir /var/log/foreman
File /var/log/foreman/hammer.log not writeable, won't log anything to file!
[ INFO 2013-10-16 16:22:11 Init] Configuration from the file /home/lzap/.foreman/cli_config.yml has been loaded
[ INFO 2013-10-16 16:22:11 Init] Extension module hammer_cli_foreman loaded
[ INFO 2013-10-16 16:22:11 HammerCLI::MainCommand] Called with options: {"verbose"=>true}
[ INFO 2013-10-16 16:22:11 HammerCLIForeman::Template] Called with options: {}
[ INFO 2013-10-16 16:22:11 HammerCLIForeman::Template::ListCommand] Called with options: {}
[ERROR 2013-10-16 16:22:11 Exception] Error: undefined method `[]' for nil:NilClass
Error: undefined method `[]' for nil:NilClass
[ERROR 2013-10-16 16:22:11 Exception]
NoMethodError (undefined method `[]' for nil:NilClass):
/home/lzap/.gem/ruby/gems/hammer_cli_foreman-0.0.7/lib/hammer_cli_foreman/template.rb:28:in `block in retrieve_data'
/home/lzap/.gem/ruby/gems/hammer_cli_foreman-0.0.7/lib/hammer_cli_foreman/template.rb:24:in `each'
/home/lzap/.gem/ruby/gems/hammer_cli_foreman-0.0.7/lib/hammer_cli_foreman/template.rb:24:in `retrieve_data'
/home/lzap/.gem/ruby/gems/hammer_cli-0.0.7/lib/hammer_cli/apipie/read_command.rb:25:in `execute'
/home/lzap/.gem/ruby/gems/clamp-0.6.1/lib/clamp/command.rb:67:in `run'
/home/lzap/.gem/ruby/gems/hammer_cli-0.0.7/lib/hammer_cli/abstract.rb:23:in `run'
/home/lzap/.gem/ruby/gems/clamp-0.6.1/lib/clamp/subcommand/execution.rb:11:in `execute'
/home/lzap/.gem/ruby/gems/clamp-0.6.1/lib/clamp/command.rb:67:in `run'
/home/lzap/.gem/ruby/gems/hammer_cli-0.0.7/lib/hammer_cli/abstract.rb:23:in `run'
/home/lzap/.gem/ruby/gems/clamp-0.6.1/lib/clamp/subcommand/execution.rb:11:in `execute'
/home/lzap/.gem/ruby/gems/clamp-0.6.1/lib/clamp/command.rb:67:in `run'
/home/lzap/.gem/ruby/gems/hammer_cli-0.0.7/lib/hammer_cli/abstract.rb:23:in `run'
/home/lzap/.gem/ruby/gems/hammer_cli-0.0.7/lib/hammer_cli/main.rb:43:in `run'
/home/lzap/.gem/ruby/gems/clamp-0.6.1/lib/clamp/command.rb:125:in `run'
/home/lzap/.gem/ruby/gems/hammer_cli-0.0.7/bin/hammer:62:in `<top (required)>'
/home/lzap/bin/hammer:23:in `load'
/home/lzap/bin/hammer:23:in `<main>'