(maint) Fix up nspooler list active bug

If no reason is defined for checking out a nspooler VM we'd get a nil
refrence error message when listing active nspooler VMs. This PR fixes
that.
This commit is contained in:
Christopher Thorn 2022-02-08 11:53:55 -08:00
parent ecf8925775
commit 5793ea78b9

View file

@ -144,7 +144,7 @@ class Utils
when 'NonstandardPooler' when 'NonstandardPooler'
line = "- #{host_data['fqdn']} (#{host_data['os_triple']}" line = "- #{host_data['fqdn']} (#{host_data['os_triple']}"
line += ", #{host_data['hours_left_on_reservation']}h remaining" line += ", #{host_data['hours_left_on_reservation']}h remaining"
line += ", reason: #{host_data['reserved_for_reason']}" unless host_data['reserved_for_reason'].empty? line += ", reason: #{host_data['reserved_for_reason']}" unless host_data['reserved_for_reason'].nil? || host_data['reserved_for_reason'].empty?
line += ')' line += ')'
output_target.puts line output_target.puts line
else else