Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 4.10.6
-
None
-
None
-
Platform Core
-
1
-
Platform Core KANBAN
-
Needs Assessment
-
Not Needed
-
No Action
-
test created for change
Description
Recently when playing around with reports in irb, I discovered that the exit_status method raises an exception when called against a report from an interrupted (ctrl + c or other) puppet run.
irb(main):007:0> a.exit_status
|
NoMethodError: undefined method `[]' for nil:NilClass
|
from /Users/matthaus/src/puppet/lib/puppet/transaction/report.rb:380:in `exit_status'
|
from (irb):7
|
from /usr/local/opt/ruby/bin/irb:11:in `<main>'
|
The metrics instance variable is not fully populated for that report and the lookups performed in the exit_status method are not safe with respect to metrics being an empty hash.