Merge pull request #154 from cthorn42/maint/main/fix_nspooler_list_active_nil_error

(maint) Fix up nspooler list active bug
This commit is contained in:
Samuel 2022-02-08 14:04:31 -06:00 committed by GitHub
commit 1b64ce3b03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,7 +144,7 @@ class Utils
when 'NonstandardPooler'
line = "- #{host_data['fqdn']} (#{host_data['os_triple']}"
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 += ')'
output_target.puts line
else